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 134: Line 134:
git diff subdir/filename
git diff subdir/filename
</source>
</source>
Pour ajouter les modifications apportées à votre dépôt local dans l'index GIT, validez cet index :


To add changes made into your local repository into the GIT index, then commit this index :
*Avec Eclipse : Faites un clic droit sur le fichier ou le répertoire à valider. Sélectionnez le fichier à ajouter, supprimer ou mettre à jour.


*With Eclipse: Right click on file or directory to commit. Select file to add/remove/update into commit.
*Avec l'interface de ligne de commande GIT :
*With GIT Command Line Interface:


<source lang="bash">
<source lang="bash">
git commit -a -m "Commit text"
git commit -a -m "Texte du commit"
</source>
</source>
This will save add and changes into your local branch.
Cela enregistrera les ajouts et les modifications dans votre branche locale.


To push them on the GIT repository server,
Pour les pousser sur le serveur du dépôt GIT :


*With Eclipse: right click on project and choose "'''Team - Push to Upstream'''".
*Avec Eclipse : Faites un clic droit sur le projet et choisissez « Équipe - Transférer vers l'amont ».
*With GIT Command Line Interface:
 
*Avec l'interface de ligne de commande GIT :


<source lang="bash">
<source lang="bash">
Line 154: Line 155:
</source>
</source>


To cancel a commit:
Pour annuler un commit :


*With GIT Command Line Interface:
*Avec l'interface de ligne de commande GIT :


<source lang="bash">
<source lang="bash">
git revert IdCommit or  git revert HEAD (for last commit)
git revert IdCommit ou git revert HEAD (pour le dernier commit)
</source>
</source>


Navigation menu