Created
February 16, 2025 17:24
-
-
Save nadvolod/95ea73d70d4ab53a8c899bed992e1806 to your computer and use it in GitHub Desktop.
My favorite .gitconfig aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Status - quick overview | |
git config --global alias.st status | |
git config --global alias.s "status -s" | |
# Committing | |
git config --global alias.co commit | |
git config --global alias.cm "commit -m" | |
git config --global alias.ca "commit --amend" | |
# Branch management | |
git config --global alias.ch checkout | |
git config --global alias.cb "checkout -b" | |
git config --global alias.br branch | |
# Pretty log viewing | |
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
# Working with changes | |
git config --global alias.aa "add --all" | |
git config --global alias.ap "add -p" | |
git config --global alias.dc "diff --cached" | |
# Quick fixes | |
git config --global alias.unstage "reset HEAD --" | |
git config --global alias.undo "reset --soft HEAD~1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment