issue77:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue77:c_c [2013/10/01 16:51] – créée andre_domenech | issue77:c_c [2014/02/25 16:07] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ** | ||
Last month, I introduced readers to the newly minted github repository that contained the CLI Cookbook I put together with input from our readers. Since then, I've had some activity from readers – fixing mistakes and adding content. However, in doing so, I realized I never included information on keeping your local fork synchronized with my master branch – which makes handling pull requests very difficult for me, as I have to manually carry over any changes. As such, I will briefly cover fetching upstream changes. | Last month, I introduced readers to the newly minted github repository that contained the CLI Cookbook I put together with input from our readers. Since then, I've had some activity from readers – fixing mistakes and adding content. However, in doing so, I realized I never included information on keeping your local fork synchronized with my master branch – which makes handling pull requests very difficult for me, as I have to manually carry over any changes. As such, I will briefly cover fetching upstream changes. | ||
Steps 1-3 are required when you first set up your repository on the local system. Step 4 is the command you want to run for pulling in upstream updates. As such, the first time you do this, follow all 4 steps, but after that you can jump right to Step 4. | Steps 1-3 are required when you first set up your repository on the local system. Step 4 is the command you want to run for pulling in upstream updates. As such, the first time you do this, follow all 4 steps, but after that you can jump right to Step 4. | ||
+ | ** | ||
+ | Le mois dernier, j'ai présenté aux lecteurs le dépôt github nouvellement créé qui contenait le CLI Cookbook que j'ai mis en place avec les commentaires de nos lecteurs. Depuis, j'ai reçu un certain retour des lecteurs : correction des erreurs et ajout de contenu. Mais, en voyant ces contributions, | ||
+ | |||
+ | Les étapes 1 à 3 sont nécessaires lorsque vous configurez votre espace de stockage sur le système local. L' | ||
+ | |||
+ | ** | ||
Step 1 | Step 1 | ||
Fork the repository (on github simply click the fork button on the repository you want to fork). | Fork the repository (on github simply click the fork button on the repository you want to fork). | ||
Ligne 21: | Ligne 28: | ||
Replace <repo name> with the name of your local fork. The second command creates a new repository alias in the configuration file for the local fork (located in the .git folder). The URL will need to be changed according to what repository it is you forked. | Replace <repo name> with the name of your local fork. The second command creates a new repository alias in the configuration file for the local fork (located in the .git folder). The URL will need to be changed according to what repository it is you forked. | ||
+ | ** | ||
+ | Étape 1 | ||
+ | Dupliquez le référentiel (sur github cliquez simplement sur le bouton de la fourche sur le référentiel que vous voulez dupliquer). | ||
+ | |||
+ | Étape 2 | ||
+ | Créez une copie locale de la branche. | ||
+ | |||
+ | git clone https:// | ||
+ | |||
+ | Remplacez < | ||
+ | |||
+ | Étape 3 | ||
+ | |||
+ | Configurez l' | ||
+ | |||
+ | cd <repo name> | ||
+ | |||
+ | git remote add upstream https:// | ||
+ | |||
+ | Remplacez <repo name> par le nom de votre référentiel local. La deuxième commande crée un nouvel alias du référentiel dans le fichier de configuration pour la branche locale (situé dans le dossier .git). L'URL doit être modifiée selon le référentiel que vous avez dupliqué. | ||
+ | |||
+ | ** | ||
Step 4 | Step 4 | ||
Now if you want to pull in any new changes from the original repository, all you need to do is this: | Now if you want to pull in any new changes from the original repository, all you need to do is this: | ||
Ligne 34: | Ligne 63: | ||
This should take you through each conflict step by step (it's extremely useful to have some knowledge of diff, as it is the general format used for conflicts). | This should take you through each conflict step by step (it's extremely useful to have some knowledge of diff, as it is the general format used for conflicts). | ||
+ | ** | ||
+ | Étape 4 | ||
+ | Maintenant, si vous voulez mettre à jour les changements à partir du référentiel original, tout ce que vous devez faire est : | ||
+ | |||
+ | git fetch upstream | ||
+ | |||
+ | git merge upstream/ | ||
+ | |||
+ | Ceci va récupérer toutes les modifications du référentiel original et la deuxième commande les fusionne avec votre copie locale. Si vous avez des modifications dans votre branche locale qui n' | ||
+ | |||
+ | git mergetool | ||
+ | |||
+ | Elle vous fera examiner chaque conflit pas à pas (c'est très utile d' | ||
+ | |||
+ | ** | ||
As you can see – this isn't an extremely complicated process. The key point is how to register the original repository as upstream, after which it progresses as you might imagine. Unfortunately, | As you can see – this isn't an extremely complicated process. The key point is how to register the original repository as upstream, after which it progresses as you might imagine. Unfortunately, | ||
I hope this has helped explain how to keep your forks up to date – and is the start of plenty more additions to the CLI Cookbook! Thanks to anyone who has contributed so far (either in the Google Doc or the Github repository). If you have any questions, or suggestions, | I hope this has helped explain how to keep your forks up to date – and is the start of plenty more additions to the CLI Cookbook! Thanks to anyone who has contributed so far (either in the Google Doc or the Github repository). If you have any questions, or suggestions, | ||
+ | ** | ||
+ | |||
+ | Comme vous pouvez le voir, ce n'est pas un processus extrêmement compliqué. Le point clé est comment enregistrer le référentiel original comme amont et, après cela, ça avance comme vous pourriez l' | ||
+ | |||
+ | J' | ||
+ |
issue77/c_c.1380639081.txt.gz · Dernière modification : 2013/10/01 16:51 de andre_domenech