Last active
November 29, 2021 23:16
-
-
Save prerak-proof/aea9481b015c3cf72dc88815dd9f0a0f to your computer and use it in GitHub Desktop.
Git shortcuts
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
alias cleangit='git branch --merged=master | grep -v "master$" | xargs -r git branch -d' | |
function gitmaster() { | |
git fetch -p || return 1 | |
git --no-pager log --oneline master..origin/master | |
git pull --rebase origin master:master || return 1 | |
git checkout master || return 1 | |
cleangit | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment