Last active
October 27, 2022 18:51
-
-
Save Bojole/9ad0a9a858327763a453e5dcd2141d5d to your computer and use it in GitHub Desktop.
Git 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
git config --global alias.a "! git add . && git status" | |
git config --global alias.aa "! git add . && git add -u . && git status" | |
git config --global alias.ac "! git add . && git commit" | |
git config --global alias.acm "! git add . && git commit -m" | |
git config --global alias.alias "! git config --list | grep 'alias\.' | sed 's/alias\.\([^=]*\)=\(.*\)/\1\ => \2/' | sort" | |
git config --global alias.au "! git add -u . && git status" | |
git config --global alias.c "commit" | |
git config --global alias.ca "commit --amend" | |
git config --global alias.cm "commit -m" | |
git config --global alias.co checkout | |
git config --global alias.d diff | |
git config --global alias.l "log --graph --all --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'" | |
git config --global alias.last "log -1 HEAD" | |
git config --global alias.lg "log --color --graph --pretty=format:'%C(bold white)%h%Creset -%C(bold green)%d%Creset %s %C(bold green)(%cr)%Creset %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" | |
git config --global alias.ll "log --stat --abbrev-commit" | |
git config --global alias.llg "log --color --graph --pretty=format:'%C(bold white)%H %d%Creset%n%s%n%+b%C(bold blue)%an <%ae>%Creset %C(bold green)%cr (%ci)' --abbrev-commit" | |
git config --global alias.master checkout master | |
git config --global alias.s status | |
git config --global alias.unstage "reset HEAD --" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To load all these aliases for your current environment and also have them configured
--global
-ly. Perform these steps:git-alias.sh
filesource ~/git-alias.sh
<-- Assuming the file was in yourhome
folder