Last active
August 29, 2015 14:02
-
-
Save monking/33891f07f079dcd2489a to your computer and use it in GitHub Desktop.
Git aliases, and Bash aliases for Git
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
# go to git root | |
alias gu='cd $(git rev-parse --show-cdup)' |
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
[alias] | |
co = checkout | |
s = status | |
r = rebase | |
f = fetch | |
l = log | |
md = branch -a --merged | |
si = submodule update --init | |
mt = mergetool | |
# show all commits not shared between two branches | |
# usage: git ld leftbranch...rightbranch | |
ld = log --cherry-pick --oneline --left-right | |
# open all conflicting files in Vim, searching for conflicts | |
vc = !vim +'/^[<=>]\\{7}' $(git status | grep 'both \\(modified\\|added\\):' | perl -pe 's/^.*both (modified|added):\\s+(.*)$/$2/') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment