Skip to content

Instantly share code, notes, and snippets.

@nothingrealhappen
Last active May 21, 2020 03:25
Show Gist options
  • Save nothingrealhappen/e988ef9bebad865114abc867eefde1fb to your computer and use it in GitHub Desktop.
Save nothingrealhappen/e988ef9bebad865114abc867eefde1fb to your computer and use it in GitHub Desktop.
refresh your branch from master
grecreate() {
branch_name=$(git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3)
git checkout master
git pull --rebase
git branch -D $branch_name
git checkout -b $branch_name
git submodule update
}
gupdate() {
git fetch origin master:master
git rebase master
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment