Command Reference
Git
Git workflow aliases
Git Commands (38 aliases)
| Alias | Command | Description |
|---|---|---|
gs | git status | Status |
ga | git add . | Stage all |
gaf <file> | git add <file> | Stage specific file |
gc <msg> | git commit -m | Commit |
gca <msg> | git commit -am | Commit all tracked |
gp | git push | Push |
gpf | git push --force-with-lease | Force push (safe) |
gpl | git pull | Pull |
gpr | git pull --rebase | Pull with rebase |
gd | git diff | Diff |
gds | git diff --staged | Diff staged |
gdf <file> | git diff <file> | Diff file |
gco <branch> | git checkout <branch> | Switch branch |
gcb <name> | git checkout -b <name> | Create branch |
gb | git branch | List branches |
gba | git branch -a | All branches |
gbd <name> | git branch -d <name> | Delete branch |
gbD <name> | git branch -D <name> | Force delete branch |
gl | git log --oneline -10 | Short log |
glg | git log --graph --all -20 | Graph log |
gla | git log --all -20 | All branches log |
grl | git reflog -10 | Reflog |
gst | git stash | Stash |
gstp | git stash pop | Pop stash |
gstl | git stash list | List stashes |
grs <file> | git restore <file> | Discard changes |
grss <file> | git restore --staged | Unstage |
gra | git restore . | Discard all |
gm <branch> | git merge <branch> | Merge |
grb <branch> | git rebase <branch> | Rebase |
grbi <ref> | git rebase -i <ref> | Interactive rebase |
gcl <url> | git clone <url> | Clone |
gbl <file> | git blame <file> | Blame |
gtag <name> | git tag <name> | Tag |
gcp <hash> | git cherry-pick | Cherry-pick |
grv <hash> | git revert <hash> | Revert |
gsh <ref> | git show <ref> | Show commit |
gcn | git clean -fd | Clean untracked |
gf | git fetch | Fetch |
gfa | git fetch --all | Fetch all |
gpsu <branch> | git push -u origin | Push & set upstream |