Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a git repo, but my boss wants to see the code in an SVN incl. commit-messages.

Is there a way to add the SVN to git as a branch (like boss-branch), so that I can work with my own branches, merge to boss-branch and do a svn-commit?

Thanks & Greetings, Tobi

share|improve this question
up vote 1 down vote accepted

If you need to keep the SVN repository and you can't migrate from it (which is what it sounds like), then no: you can't have two different repositories represented in your single repository.

What you need instead is a combination of git-svn updated separately.

  1. create your git svn clone in a separate directory ("directory1")
  2. keep your git-based project in its own repository ("directory2")
  3. in your git repo ("directory2"), pull from the svn-clone in directory1 into whatever branch you want (which is easy to get wrong, so do be careful there if you're not heavily familiar with git).
  4. make any changes you want in directory2
  5. pull them back into directory1 using 'git pull'
  6. git svn dcommit from directory1 to push them back

This process is easy to get wrong, especially when using the master branch on the git svn clone and a boss-branch in the regular process, so be sure to run some test cases first.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .