git init | inizializza un repository nella directory corrente |
git clone <URL> | crea una copia locale completa di un repository remoto |
git config | imposta opzioni globali (--global) o per repository (--local) |
git add | mette modifiche in staging (-p interattivo) |
git commit | salva uno snapshot nella history (-m, -a, --amend) |
git status | stato di working directory e staging area |
git diff | differenze tra working copy, staging, commit, branch |
git log | cronologia dei commit (--oneline, -p, --graph, --author, --grep) |
git blame | chi ha modificato ogni riga di un file |
git tag | gestisce i tag (-a annotated, -d elimina) |
git stash | mette da parte le modifiche non committate (pop, apply, list) |
git rm | rimuove file dal tracciamento (--cached, --force) |
git revert | annulla un commit con un commit inverso (sicuro) |
git reset | annulla commit riscrivendo la history (--soft, --mixed, --hard) |
git branch | elenca/crea/rinomina/elimina branch (-d, -D, -m, -a) |
git checkout | estrae branch/commit/tag nella working copy |
git merge | unisce due history (fast-forward o three-way) |
git rebase | sposta/riscrive commit (--interactive, --continue, --abort) |
git remote | gestisce i remoti (add, rename, rm, -v) |
git fetch | scarica commit/branch/tag dal remote senza applicarli |
git pull | fetch + integrazione (--rebase / --no-rebase) |
git push | invia commit/branch/tag al remote (--tags, --all, --force-with-lease) |