Last active
September 14, 2017 00:20
-
-
Save octylFractal/d20ef01c6d2d38716d8be7a05d2ac29e to your computer and use it in GitHub Desktop.
Re-master your branch: pull latest master and rebase upon it.
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
#!/usr/bin/env bash | |
set -e | |
master="$1" | |
if [[ "$master" == "" ]]; then master=master; fi | |
current_branch="$(git name-rev --name-only HEAD)" | |
set -x | |
git checkout "$master" | |
git pull | |
git checkout "$current_branch" | |
git rebase "$master" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment