Skip to content

Instantly share code, notes, and snippets.

@radamant
Created January 20, 2010 17:39
Show Gist options
  • Select an option

  • Save radamant/282034 to your computer and use it in GitHub Desktop.

Select an option

Save radamant/282034 to your computer and use it in GitHub Desktop.
function current_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "${ref#refs/heads/}"
}
function svn_get_and_rebase {
branch=$(current_git_branch)
git co master
git svn rebase
git co ${branch}
git rebase master
}
alias masterbase="svn_get_and_rebase"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment