A collection of powerful git aliases designed to boost your productivity and streamline your git workflow . These aliases transform lengthy git commands into short, memorable shortcuts, helping developers work more efficiently with version control.
Git aliases are custom shortcuts that save time and reduce typing when working with git commands. Instead of typing
git status
, you can simply type gst
. These aliases are particularly valuable for:
- Increased Productivity: Reduce keystrokes by up to 70% on common git operations
- Muscle Memory: Short, consistent aliases become second nature quickly
- Reduced Errors: Less typing means fewer typos in critical git commands
- Workflow Optimization: Complex command sequences become simple one-liners
This collection includes carefully selected aliases for the most common git operations:
g
- gitgst
- git statusga
- git addgcm
- git commit -mgc
- git checkoutgcb
- git checkout -b
gp
- git pushgl
- git pullgpr
- git pull --rebasegf
- git fetchgfa
- git fetch --allgclone
- git clonegr
- git remote
gbd
- git branch -Dgm
- git mergegrb
- git rebasegcp
- git cherry-pick
glog
- git log .gcl
- git config --list
grs
- git reset --softgrh
- git reset --hardgstash
- git stash push -m
gpo
- git push origin -u (current branch)pr
- Push current branch and create PR with GitHub CLI
Run the installation script:
./install-unix.sh
This script works for any Unix-based OS, including macOS, Linux, and WSL.
Run the cross-environment installation script:
./install-windows.sh
Features:
- 🔍 Auto-detects available environments (Git Bash, WSL, PowerShell)
- 🎯 Smart installation to your preferred terminal(s)
- 🔄 Cross-environment support - use the same aliases in both Git Bash and PowerShell
- 📁 Automatic profile management - creates PowerShell profiles if needed
Installation Options:
- Git Bash/WSL only - Traditional shell aliases
- PowerShell only - PowerShell functions
- Both environments (recommended) - Works everywhere!
- Git (obviously!)
- For the
pr
alias: GitHub CLI installed and configured - macOS/Linux: Zsh or Bash shell
- Windows: Git Bash or WSL
Feel free to suggest additional aliases that would improve git productivity. Create an issue or submit a pull request with your recommendations!