Git

Git Raccourcis

Git CLI command reference for version control — staging, committing, branching and remote operations.

Source : Documentation officielle · Mis a jour 2025-05

Raccourcis
5
Categories

Guide du cheat sheet

Git raccourcis a apprendre en premier

Cette page rassemble 32 raccourcis clavier consultables pour Git dans 5 categories. Commencez par les categories principales, puis imprimez la fiche si vous voulez la garder a portee de main.

  • Changez d'onglet OS pour voir les raccourcis Windows, macOS ou Linux.
  • Utilisez / pour lancer la recherche immediatement.
  • Utilisez le mode comparaison entre plusieurs machines.
  • Imprimez ou enregistrez la page en PDF compact.
Setup & Init 4 shortcuts
git init
gitinit
git clone <url>
gitclone<url>
git config --global user.name
gitconfig--globaluser.name
git config --global user.email
gitconfig--globaluser.email
Staging & Committing 8 shortcuts
git status
gitstatus
git add <file>
gitadd<file>
git add . (stage all)
gitadd.
git commit -m "msg"
gitcommit-m"msg"
git commit --amend
gitcommit--amend
git reset HEAD <file> (unstage)
gitresetHEAD<file>
git diff (unstaged changes)
gitdiff
git diff --staged
gitdiff--staged
Branches 7 shortcuts
git branch (list)
gitbranch
git branch <name> (create)
gitbranch<name>
git checkout <branch>
gitcheckout<branch>
git checkout -b <branch> (create+switch)
gitcheckout-b<branch>
git merge <branch>
gitmerge<branch>
git branch -d <branch> (delete)
gitbranch-d<branch>
git rebase <branch>
gitrebase<branch>
Remote 6 shortcuts
git remote -v (list remotes)
gitremote-v
git fetch
gitfetch
git pull
gitpull
git push
gitpush
git push -u origin <branch>
gitpush-uorigin<branch>
git push --force-with-lease
gitpush--force-with-lease
Log & History 7 shortcuts
git log
gitlog
git log --oneline
gitlog--oneline
git log --graph --oneline
gitlog--graph--oneline
git show <commit>
gitshow<commit>
git stash
gitstash
git stash pop
gitstashpop
git reset --hard HEAD
gitreset--hardHEAD

Questions frequentes

Quel est le moyen le plus rapide de trouver les raccourcis Git sur cette page?

Utilisez la barre de recherche ou appuyez sur /, puis tapez une action comme git init.

Puis-je imprimer cette fiche de raccourcis Git?

Oui. Utilisez le bouton Imprimer / PDF ou la commande d'impression du navigateur pour sauvegarder une fiche compacte.

Cette page inclut-elle les raccourcis Windows et Mac pour Git?

Oui. Utilisez les onglets OS pour passer des raccourcis Windows aux raccourcis macOS. Par exemple, git init est git init sur Windows et git init sur macOS si disponible.

Advertisement
Aucun raccourci ne correspond a la recherche.