Last active
August 6, 2019 12:36
-
-
Save aviemzur/94f24a17b41af7f9533e58d4709fa298 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] update = "!git checkout master && git pull && git checkout -" | |
[alias] push-new = "!git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)" | |
[alias] push-aviemzur-new = "!git push --set-upstream aviemzur $(git rev-parse --abbrev-ref HEAD)" | |
[alias] close = "!f() { git checkout master && git merge --no-ff -m \"This closes #$1\" pr/$1; }; f" | |
[alias] pr = "!f() { git checkout master && git fetch origin && git branch -D pr/$1 || : && git checkout pr/$1; }; f" | |
[alias] review = "!f() { git branch -D review-before || : && git checkout $1 -b review-before && git checkout -; }; f" | |
[alias] fresh = "!f() { git branch | grep -v master | xargs git branch -D; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment