Last active
August 29, 2015 14:00
-
-
Save afiocre/11372720 to your computer and use it in GitHub Desktop.
Commandes GIT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aide en ligne: http://byte.kde.org/~zrusin/git/git-cheat-sheet-medium.png | |
*** Commandes de base *** | |
git checkout -b <branch> (change de branche en la copiant depuis origine) | |
git checkout <branch> (change de branche) | |
git checkout <fichier> (remet le fichier à l'état de la branche) | |
git branch -a (voir tles branches + les remotes local) | |
git merge <branch> (rebase la branche vers la branche en cours) | |
git rebase <branch> (rebase la branche vers la branche en cours) | |
*** ADD + COMMIT *** | |
git add <fichiers> | |
git commit -m "message de commit" | |
*** STASH (mettre de coté des devs) *** | |
git stash list (voir la liste des stash) | |
git stash show stash@{<numero>} (Voir le contenu du stash) | |
git stash (mettre les devs en cours de coté) | |
git stash pop (remettre le dernier stash fait sur la branche en cours) | |
git stash pop stash@{<numero>} (remettre le stash sur la branche en cours) | |
git stash drop stash@{<numero>} (supprimer un stash) | |
*** PULL + PUSH *** | |
git remote update -p (maj origin local) | |
git pull --rebase origin <branch> (récupérer la branche de l'origine) | |
** Si conflits ** | |
<regler les pb dans l'IDE> | |
git add <fichiers corrigés> | |
git rebase --continue | |
git push origin <branch> (pusher vers la branche) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment