1

I've just started using git-svn to allow for more fine-grained branching and committing than I'd be able to use with the remote, controlled-by-another-company svn repo we're working in.

I've now set up my .gitignore and .gitattributes files for the branch, in my workspace, and I would prefer to be able to submit (and thus track) them in my local git repo. However, when dcommitting my changes -/hardback to svn, those files must not be submitted back into the svn repo.
I can't just ignore the folder they're in either, however, because of course they're in the root of the workspace.

Does anyone have a solution? (apart from ignoring them in the git-svn branch, sym-/hardlinking them in from another location and adding them to a git repo there--it's overcomplicated and they're not in their corresponding branch anymore then, so I'd rather try to find a different solution in that case).

kaya3
  • 41,043
  • 4
  • 50
  • 79
Johann Studanski
  • 895
  • 9
  • 18

1 Answers1

0

As seen here, there is no easy solution.

For common files, you could use git update-index --assume-unchanged <file>, but in your case, you want to exclude a file from being part of the svn repo.

The only workaround (more complex, I know) would be to do your svn dcommit from a dedicated branch where you delete those 2 files.
Then you switch back to your original Git branch and go on working, until the next svn dcommit.

VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755