git branch | Voir les branches locales |
git branch -r | Voir les branches distantes |
git branch -a | Voir toutes les branches (locales et distantes) |
git branch --merged | Voir les branches fusionnées dans la branche actuelle |
git branch --no-merged | Voir les branches non fusionnées dans la branche actuelle |
git branch -m <new-branch> | Renommer la branche actuelle en new-branchgit branch -m <new-branch> |
git branch -M <new-branch> | Forcer le renommage de la branche actuelle en new-branchgit branch -M <new-branch> |
git branch -m <old-branch> <new-branch> | Renommer old-branch en new-branchgit branch -m <old-branch> <new-branch> |
git branch -M <old-branch> <new-branch> | Forcer le renommage de old-branch en new-branchgit branch -M <old-branch> <new-branch> |
git checkout <branch-name> | Basculer vers la branche spécifiéegit checkout <branch-name> |
git branch <new-branch> | Créer une nouvelle branche |
git branch --track <new> <remote> | Créer et suivre une branche distantegit branch --track <new> <remote> |
git branch -d <branch-name> | Supprimer une branche localegit branch -d <branch-name> |
git tag | Lister toutes les étiquettes locales |
git tag <tag-name> | Créer une étiquette basée sur le dernier commit |
git tag -d <tag-name> | |