Skip to content

Commit 83504c2

Browse files
authoredMay 24, 2017
infos git revert
1 parent 676fb4d commit 83504c2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed
 

‎560-troubleshooting.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ Le plus important, avec Git, c'est d'adopter la pratique du "versionnement" dans
2323
Résolution de problèmes typiques:
2424
==
2525

26+
**Problème:** On souhaite annuler un commit précis qu'on a effectué.
27+
28+
Solution: trouver le numéro identifiant du commit, et faire:
29+
30+
```
31+
git revert --no-commit cc9c8f9 e7f7b31 0c2d789
32+
```
33+
34+
Les numéros étant ici à remplacer par les vrais identifiants des commits.
35+
2636
**Problème:** Lors de la synchronisation, Git dit: *Sync Failed - There are both local and remote commits. Please commit all your changes and then sync again*.
2737

2838
**Tentative:**
@@ -95,4 +105,4 @@ C'est plus simple avec un graphe
95105

96106
Pour sa présentation *"[Changing History, or How to Git pretty](http://justinhileman.info/article/changing-history/)"*, Justin Hileman a créé le graphe "escape a git mess, step-by-step" - un visuel qui vous montre les différents cheminements pour résoudre un problème dans Git:
97107

98-
![escape a git mess, step-by-step](/cours-divers/img/git-pretty.png)
108+
![escape a git mess, step-by-step](/cours-divers/img/git-pretty.png)

0 commit comments

Comments
 (0)
Please sign in to comment.