issue85:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue85:c_c [2014/09/10 14:59] – créée andre_domenech | issue85:c_c [2014/11/29 17:53] (Version actuelle) – d52fr | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ===== 1 ===== | ||
+ | ** | ||
Last month I began introducing the various concepts and terminology used by Git. This month we'll be taking it a step further, and running through a series of examples on actually using Git (in combination with GitHub; creating a custom Git server falls outside of the scope of this article). I will be assuming you either have a free account with GitHub, or else that you have found someone' | Last month I began introducing the various concepts and terminology used by Git. This month we'll be taking it a step further, and running through a series of examples on actually using Git (in combination with GitHub; creating a custom Git server falls outside of the scope of this article). I will be assuming you either have a free account with GitHub, or else that you have found someone' | ||
Note: If you don't have a GitHub account, and are using someone' | Note: If you don't have a GitHub account, and are using someone' | ||
+ | ** | ||
+ | Le mois dernier, j'ai commencé à introduire les différents concepts et la terminologie utilisés par Git. Ce mois-ci, nous allons aller un peu plus loin, et parcourir une série d' | ||
+ | |||
+ | Remarque: Si vous n'avez pas de compte GitHub, et que vous utilisez le dépôt d'une autre personne, vous ne serez pas nécessairement en mesure de téléverser vers lui. Vous pouvez créer votre propre copie du dépôt par bifurcation (ça nécessite aussi un compte). | ||
+ | |||
+ | ** | ||
Step One: Create a Repository | Step One: Create a Repository | ||
Ligne 19: | Ligne 27: | ||
• .gitignore settings | • .gitignore settings | ||
• Choosing a license for the repository. | • Choosing a license for the repository. | ||
+ | ** | ||
+ | Première étape: créer un dépôt | ||
+ | |||
+ | Si vous préférez utiliser un dépôt existant (ou ne pas créer un compte GitHub), ignorez cette étape. | ||
+ | |||
+ | Tout en haut de l' | ||
+ | |||
+ | Requis: | ||
+ | • Nom du dépôt | ||
+ | • Propriétaire | ||
+ | • Public/ | ||
+ | |||
+ | Facultatif: | ||
+ | • Description du dépôt | ||
+ | • Initialisation avec un Lisez-moi. | ||
+ | • Paramétrage de .gitignore | ||
+ | • Choix d'une licence pour le dépôt. | ||
+ | |||
+ | ===== 2 ===== | ||
+ | ** | ||
Step Two: Clone the Git Repository | Step Two: Clone the Git Repository | ||
Ligne 30: | Ligne 58: | ||
• Depending on the size of the repository, it may take a moment. Once you're back at your prompt, you have successfully cloned it. You may now want to cd into the repository folder (in my case: cd Command-Conquer-Examples). | • Depending on the size of the repository, it may take a moment. Once you're back at your prompt, you have successfully cloned it. You may now want to cd into the repository folder (in my case: cd Command-Conquer-Examples). | ||
+ | ** | ||
+ | Deuxième étape: Clone du dépôt Git | ||
+ | |||
+ | Il y a quelques outils avec interface graphique pour Linux, mais, pour les besoins de cet article, je vais me référer qu'aux seules commandes du terminal : | ||
+ | • Ouvrez un terminal. | ||
+ | • cd vers le sous-dossier où vous voulez que le dépôt soit placé. | ||
+ | • Entrez : | ||
+ | |||
+ | git clone https:// | ||
+ | |||
+ | • Selon la taille du dépôt, ça peut prendre quelque temps. Une fois qu'on vous rend la main, vous l'avez cloné avec succès. Vous pouvez maintenant vouloir aller dans le dossier du dépôt (dans mon cas: cd Command-Conquer-Examples). | ||
+ | |||
+ | ** | ||
Step Three: Making Changes | Step Three: Making Changes | ||
Ligne 41: | Ligne 82: | ||
Note: if you want to add all files, simply use a period instead of the name of the file. | Note: if you want to add all files, simply use a period instead of the name of the file. | ||
+ | ** | ||
+ | Troisième étape: Faire des changements | ||
+ | |||
+ | Pour les besoins de cet exemple, je vais éditer le fichier README.md. Naturellement, | ||
+ | • Ouvrez le fichier dans votre éditeur de texte favori. | ||
+ | • Effectuez vos modifications. | ||
+ | • Une fois que le fichier est enregistré, | ||
+ | |||
+ | git add < | ||
+ | |||
+ | Remarque: si vous voulez ajouter tous les fichiers, il suffit d' | ||
+ | |||
+ | ===== 3 ===== | ||
+ | ** | ||
Step Four: Commit | Step Four: Commit | ||
Ligne 51: | Ligne 106: | ||
• -a: Automatically adds any changes files (but ignores newly added/ | • -a: Automatically adds any changes files (but ignores newly added/ | ||
• -m < | • -m < | ||
+ | ** | ||
+ | Quatrième étape: Confirmation (Commit) | ||
+ | |||
+ | Une fois que vous avez ajouté le fichier que vous voulez et que vous êtes prêt à le confirmer dans la prochaine mise à jour de votre dépôt, vous pouvez exécuter la commande suivante: | ||
+ | |||
+ | git commit | ||
+ | |||
+ | Si vous exécutez la commande comme ceci sans aucun argument ni paramètres, | ||
+ | • -a : ajoute automatiquement tous les fichiers modifiés (mais ignore les fichiers nouvellement ajoutés ou supprimés). | ||
+ | • -m <msg> : Utilise le message fourni comme message de confirmation, | ||
+ | |||
+ | ** | ||
Step Five: Push | Step Five: Push | ||
Ligne 63: | Ligne 130: | ||
If you haven' | If you haven' | ||
+ | ** | ||
+ | Cinquième étape: Poussée (Push) | ||
+ | |||
+ | Maintenant que vous avez créé une liste de confirmation de tous les changements que vous voulez envoyer sur le dépôt distant, vous êtes prêt à les synchroniser. Dans Git cela s' | ||
+ | |||
+ | git push < | ||
+ | |||
+ | Par défaut lors de l' | ||
+ | |||
+ | git push origin master | ||
+ | |||
+ | Si vous n'avez pas configuré git pour stocker votre nom d' | ||
+ | |||
+ | ===== 4 ===== | ||
+ | ** | ||
Step Six: Checking the Remote | Step Six: Checking the Remote | ||
Ligne 79: | Ligne 161: | ||
Hopefully this article has helped to shed some light on using GitHub and Git repositories. If you have any difficulties, | Hopefully this article has helped to shed some light on using GitHub and Git repositories. If you have any difficulties, | ||
+ | ** | ||
+ | |||
+ | Sixième étape: Vérification du dépôt distant | ||
+ | |||
+ | Une fois que vous avez poussé vos changements, | ||
+ | |||
+ | Autres possibilités | ||
+ | |||
+ | Possibilité Une: Ajout d'un nouveau fichier | ||
+ | |||
+ | Dans l' | ||
+ | |||
+ | Possibilité Deux: Suppression d'un fichier | ||
+ | |||
+ | Si vous souhaitez supprimer un fichier du dépôt, le supprimer simplement du système de fichiers n'est pas suffisant. Vous aurez besoin d' | ||
+ | |||
+ | J' | ||
+ | |||
+ |
issue85/c_c.1410353968.txt.gz · Dernière modification : 2014/09/10 14:59 de andre_domenech