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
# If you pulled the latest changes and you have commits | |
# on the master branch that diverge from remote but you do not | |
# need them and just want to move the master branch locally to origin/master | |
alias master-to-origin='git co master && git branch master_moved_`date +%m-%d-%Y` && git co origin/master && git branch -D master && git branch master && git branch --set-upstream-to=origin/master master && git checkout master' | |
# Breakdown | |
git co master | |
git branch master_moved_`date +%m-%d-%Y` | |
git co origin/master |