FAQ Récupérer, mettre à jour les sources GIT du projet: Difference between revisions

Jump to navigation Jump to search
m
Tag: 2017 source edit
Tag: 2017 source edit
Line 163: Line 163:
</source>
</source>


=Ajouter un commit exterieur dans votre repository courant=
=Ajouter un commit extérieur dans votre repository courant=
Some developers may work and do commit into their own Git repository after forking the project. If you are interesting into getting this changes, you can import them with the following steps with Eclipse:
Certains développeurs peuvent travailler et effectuer des commits dans leur propre dépôt Git après avoir dupliqué le projet. Si vous souhaitez obtenir ces modifications, vous pouvez les importer avec Eclipse en suivant les étapes suivantes :


*First, go into GIT setup view and right click on "'''Remotes'''" of your Eclipse Git working space and choose "'''Create a remote...'''"
*Tout d'abord, accédez à la configuration GIT, faites un clic droit sur « Remotes » dans votre espace de travail Git Eclipse et choisissez « Créer un dépôt distant… ».
*Type name or remote fork the developer has create (in most cases, it's developer Git login). For example: "'''thedevlogin'''". Choose also "'''Configure Fetch'''".
*Saisissez le nom ou le fork distant créé par le développeur (généralement, le login Git du développeur). Par exemple : « thedevlogin ». Choisissez également « Configurer la récupération ».
*Type URI of Git repository of developer. For example: '''git://github.com/thedevlogin/dolibarr.git'''. Also add a refspec value to declare the branch you want to get. For example: '''refs/heads/master:refs/remotes/thedevlogin/master'''. Click "'''Save and Fetch'''". A new entry will be added into "Remote Tracking" making possible to read/get commits done into this branch.
*Saisissez l'URI du dépôt Git du développeur. Par exemple : « git://github.com/thedevlogin/dolibarr.git ». Ajoutez également une valeur refspec pour déclarer la branche à récupérer. Par exemple : « refs/heads/master:refs/remotes/thedevlogin/master ». Cliquez sur « Enregistrer et récupérer ». Une nouvelle entrée sera ajoutée à la section « Suivi à distance », permettant de lire et d'obtenir les commits effectués dans cette branche.


Now, go on command line of your git repository (in most cases on Linux, it's '''/home/yourlogin/git/yourdolibarr''') and type the git cherry-pick command:
Maintenant, accédez à la ligne de commande de votre dépôt Git (généralement sous Linux, il s'agit de « /home/yourlogin/git/yourdolibarr ») et saisissez la commande git cherry-pick :
<source lang="bash">
<source lang="bash">
git cherry-pick -x commitid
git cherry-pick -x commitid
</source>
</source>
where commitid is value of commit id you want to get.
où commitid correspond à l'identifiant de commit souhaité.


Once this is done, go back to Eclipse and make a refresh on project. You will see modified files appears with decorators (with conflicts if there is).
Une fois cette opération effectuée, retournez dans Eclipse et actualisez le projet. Vous verrez les fichiers modifiés apparaître avec les décorateurs (et les conflits éventuels).


It the cherry-pick fails because of conflicts, you can cancel the cherry-pick try with
Si la tentative de cherry-pick échoue à cause de conflits, vous pouvez l'annuler avec
<source lang="bash">
<source lang="bash">
git cherry-pick --abort
git cherry-pick --abort

Navigation menu