Command Reference

Git

Git workflow aliases

Git Commands (38 aliases)

AliasCommandDescription
gsgit statusStatus
gagit add .Stage all
gaf <file>git add <file>Stage specific file
gc <msg>git commit -mCommit
gca <msg>git commit -amCommit all tracked
gpgit pushPush
gpfgit push --force-with-leaseForce push (safe)
gplgit pullPull
gprgit pull --rebasePull with rebase
gdgit diffDiff
gdsgit diff --stagedDiff staged
gdf <file>git diff <file>Diff file
gco <branch>git checkout <branch>Switch branch
gcb <name>git checkout -b <name>Create branch
gbgit branchList branches
gbagit branch -aAll branches
gbd <name>git branch -d <name>Delete branch
gbD <name>git branch -D <name>Force delete branch
glgit log --oneline -10Short log
glggit log --graph --all -20Graph log
glagit log --all -20All branches log
grlgit reflog -10Reflog
gstgit stashStash
gstpgit stash popPop stash
gstlgit stash listList stashes
grs <file>git restore <file>Discard changes
grss <file>git restore --stagedUnstage
gragit 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-pickCherry-pick
grv <hash>git revert <hash>Revert
gsh <ref>git show <ref>Show commit
gcngit clean -fdClean untracked
gfgit fetchFetch
gfagit fetch --allFetch all
gpsu <branch>git push -u originPush & set upstream
Copyright © 2026