Git with Oh My Zsh Aliases: Boost Your Productivity
If you’re using Oh My Zsh, you have access to a powerful set of git aliases that can significantly speed up your development workflow. The git plugin comes pre-installed and provides dozens of shortcuts for common git operations. Essential Git Aliases Here are the most useful git aliases that will transform your daily workflow: Basic Operations 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 # Status and information gst # git status gss # git status --short gsb # git status --short --branch gl # git pull gp # git push ga # git add gaa # git add --all gc # git commit --verbose gcmsg # git commit --message gca # git commit --verbose --all gcam # git commit --all --message # Branch operations gb # git branch gba # git branch --all gbd # git branch --delete gcb # git checkout -b gco # git checkout gcm # git checkout $(git_main_branch) gcd # git checkout $(git_develop_branch) Advanced Workflow 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 # Logging and history glog # git log --oneline --decorate --graph gloga # git log --oneline --decorate --graph --all glol # git log --graph --pretty=format with colors glola # git log --graph --pretty=format with colors --all glo # git log --oneline --decorate glg # git log --stat glgp # git log --stat --patch # Stashing gsta # git stash push (or save on older git) gstp # git stash pop gsts # git stash show --patch gstd # git stash drop gstl # git stash list gstaa # git stash apply gstc # git stash clear # Merging and rebasing gm # git merge gma # git merge --abort gmc # git merge --continue grb # git rebase grba # git rebase --abort grbc # git rebase --continue grbi # git rebase --interactive Remote Operations 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 # Remote management gr # git remote grv # git remote --verbose gra # git remote add grrm # git remote remove grmv # git remote rename grset # git remote set-url # Fetching and pulling gf # git fetch gfa # git fetch --all --tags --prune gfo # git fetch origin gpr # git pull --rebase gpra # git pull --rebase --autostash gpu # git push upstream gpv # git push --verbose Diff and Show 1 2 3 4 5 6 7 # Diff operations gd # git diff gdca # git diff --cached gds # git diff --staged gdw # git diff --word-diff gdt # git diff-tree --no-commit-id --name-only -r gsh # git show My Most Used Aliases Based on daily development work, here are the aliases I use most frequently: ...