tags:

views:

57

answers:

1

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
A: 

I don't think so. I was poking around git-svn recently for other things and it gets that information by simply looking for the most recent log message with the git-svn-id item. (This is why git merge can cause problems).

You could clone the git-svn repo, which will result in a git repo you can't dcommit from, but that has some big downsides too. I wouldn't really recommend that, although it may work for you.

I also would love it if this were the case, maybe the maintainer of git-svn would include it somehow in a future release if someone asked him/her.

NUXI