Last active
April 13, 2016 20:22
-
-
Save aerze/ce104c9c68ae9b7ec3098d22bf7d3c39 to your computer and use it in GitHub Desktop.
Setup short aliases in git (you can just copy+paste into your terminal)
This file contains 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
#!/bin/bash | |
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.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.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.spull "svn rebase" | |
git config --global alias.spush "svn dcommit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment