Last active
October 16, 2017 20:05
-
-
Save incik/3a7a6ef797b69500c956ca28b9536708 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
[alias] | |
up = pull --rebase --autostash | |
br = branch | |
st = status | |
ci = commit | |
ciam = commit --amend --no-edit | |
co = checkout | |
pf = push --force-with-lease | |
pb = "!git push -u origin \"$(git rev-parse --abbrev-ref HEAD)\"" | |
clean-local = "!git branch --merged | grep -v \"\\*\" | xargs -n 1 git branch -d" | |
pr = "!open \"$(git remote -v | grep origin | grep push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/compare/master...$(git rev-parse --abbrev-ref HEAD)?expand=1\"" | |
prb = "!open \"$(git remote -v | grep origin | grep push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/compare/$(git rev-parse --abbrev-ref HEAD)%0Dmaster\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment