Skip to content

Instantly share code, notes, and snippets.

@metaskills
Created March 9, 2012 18:16
Show Gist options
  • Save metaskills/2007852 to your computer and use it in GitHub Desktop.
Save metaskills/2007852 to your computer and use it in GitHub Desktop.
function grbm () {
branch=$(git-branch-name)
git checkout master
git pull origin master
git checkout "${branch}"
git rebase master
}
function grbmc () {
branch=$(git-branch-name)
grbm
git checkout master
git rebase "${branch}"
git push origin master
if [[ -f .git/hooks/post-push ]]; then
.git/hooks/post-push
fi
git checkout "${branch}"
}
function grbd () {
branch=$(git-branch-name)
git checkout develop
git pull origin develop
git checkout "${branch}"
git rebase develop
}
function grbdc () {
branch=$(git-branch-name)
grbd
git checkout develop
git rebase "${branch}"
git push origin develop
if [[ -f .git/hooks/post-push ]]; then
.git/hooks/post-push
fi
git checkout "${branch}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment