Git Aliases: Type Less, Move Faster
If you repeat the same git commands every day, aliases turn them into muscle memory.
Aliases live in your ~/.gitconfig (or can be set globally via --global).

Quick setup
git config --global alias.co "checkout" git config --global alias.br "branch" git config --global alias.st "status" git config --global alias.lg "log --oneline --graph --all --decorate" git config --global alias.amend "commit --amend --no-edit"
The ones you’ll feel immediately
git co main→ checkoutgit st→ statusgit lg→ beautiful history graphgit amend→ amend last commit without editor
Extra: aliases for “power” operations
Example (careful—this deletes merged local branches):
git config --global alias.cleanup "!git branch --merged main | grep -v \"main\" | xargs git branch -d"
Next
If you want a full “how to not mess up” view of resets and recovery: