Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.