git-svn guestion about creating local branches
Posted
by leeed25d
on Stack Overflow
See other posts from Stack Overflow
or by leeed25d
Published on 2010-02-25T18:02:34Z
Indexed on
2010/03/30
0:53 UTC
Read the original article
Hit count: 312
Is there a way to create a local branch, or modify an existing local branch, in such a way that it cannot be dcommit'ed to the svn repo? Here's a description of the scenario.
git checkout -b local.farBranch remotes/farBranch
git checkout -b patched.local.farBranch
git merge local.patches
<work on patched branch && test>
<do not commit onto patched.local.farBranch>
git checkout local.farBranch
git commit -am "some changes"
git rebase local.farBranch patched.local.farBranch
<another work test cycle>
git checkout local.farBranch
git commit -am "last changes"
git svn dcommit
Now, I never want to dcommit patched.local.farBranch (which is tracking remotes/farBranch) because that would put my local patches into the SVN repository. This is not a fatal problem but it is a pain in the keester because the patch has to be removed when the SVN farBranch is eventally (SVN) merged onto the trunk. So what I am looking for is a way to prevent this
git checkout patched.local.farBranch
git svn dcommit <<== ERROR
git checkout local.farBranch
git svn dcommit <<== OK
© Stack Overflow or respective owner