1

I use git locally, and git-svn to work with a shared Subversion repository. I have a local branch with some parameter changes that are relevant to my test environment, but that I would never want to share with everyone else. Right now the way I'm doing that is by having a local branch with that parameter commit. However, I'd like to make sure I never accidentally commit that branch to SVN.

Is there a way I can flag this commit (or branch) to make git svn dcommit yell at me first? Or maybe a hook that would check so that, say, I can only git svn dcommit from master?

UltraNurd
  • 1,314
  • 2
  • 14
  • 24
  • An easy way is just to clone your git svn repository. Then you'll have a repos that does not know about svn, do whatever you want there, and push to your git svn repos when ready to dcommit – rcomblen May 10 '13 at 22:40

3 Answers3

0

you could try Can I mark a GIT remote as read only? which prevents writing to a remote. I haven't checked if a branch can be tweaked in a similar manner.

Community
  • 1
  • 1
Philip Oakley
  • 13,333
  • 9
  • 48
  • 71
  • This looks like it would work if I were pushing to a git remote instead of using svn dcommit, but this might be the right idea. – UltraNurd May 13 '13 at 14:17
0

You can use "Cherry Picking" for this, just cherry pick an old commit containing only the common config values.

Borislav Sabev
  • 4,776
  • 1
  • 24
  • 30
0

Due to wording, I missed a similar question desiring the same idiot-proofing; this answer sets up a shell configuration that prevents git svn dcommit from being run on any branch but master.

Community
  • 1
  • 1
UltraNurd
  • 1,314
  • 2
  • 14
  • 24