1

I'm trying to use an svn repository via git-svn, and I've added the svn externals as git submodules.

It looks like this has staged the submodule directories though, and I don't want to commit them back to svn.

I've tried adding them to .gitignore and using:

$ git reset HEAD

to unstage them, but now they no longer show up when I enter:

$ git submodule

Is this correct? Can I add svn externals as git submodules without committing them back to svn?

Thanks!

James
  • 1,430
  • 4
  • 20
  • 27

1 Answers1

3

The only git-svn tool which supports this is SubGit (as mentioned in "Using git submodules in a git-svn project" or "The story of Git, Git-Submodule and a SVN server", by Dmitry Pavlenko, the main creator of SubGit).

Otherwise, you have to:

The idea would be to:

  • work in that dedicated branch
  • cherry-pick your new commits (ie any commmit which isn't the one adding submodules) back to master
  • git svn dcommit from master (a branch with your commits copied from the dedicated branch, but free of any submodule declaration)
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250