1
votes

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?

3
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 dcommitrcomblen

3 Answers

0
votes

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.

0
votes

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

0
votes

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.