Question

Is there a way to keep a file in local git-svn repo, but ignore it in git-svn dcommit? I have few scripts/batch files which I had like to keep in local git-svn repo but not dcommit to central SVN repo.

is that possible?

Was it helpful?

Solution

If the files are in directories that are in Subversion, then I don't think there is a good way. So I will assume they are not mixed in Subversion directories, I will assume you can put these scripts in a dedicated directory.

Given the assumptions above, I can think of the following options:

  1. Mark the directory ignored. You can do whatever with it, it will never be pushed back to Subversion. You could turn it into an independent Git repository on its own. Or just do nothing. I habitually put a tmp directory in almost every project, for transient files I don't want to be part of the project.

  2. Add the scripts to Subversion and let your teammates enjoy their benefits.

  3. Add the scripts to a dedicated branch that you will never push back to Subversion. But I don't think this would be practical at all, and one day you might mistakenly push it by accident.

PS: you might find this related post interesting too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top