1

I'm having a local project and I want to use a git repository as versioning software.

As I'm using an external software on a SVN server as base for my project I think the best way is to have it as a vendor branch in my git project so external changes don't affect my code and I can merge the vendor branch in the main trunk from time to time.

Is it possible to mix git and SVN like this? What is the best project layout and how do I actually merge the vendor branch in the main trunk?

acme
  • 14,654
  • 7
  • 75
  • 109
  • When you say that you want to use the code from Subversion as a base for your project, do you mean that your new project will essentially be a fork of that (and have similar files initially) or that you would like to use it as a library that your new project depends on (probably in a sub-directory)? – Mark Longair Mar 18 '11 at 13:03
  • It's more like a fork. It's an open source project I need to modify in a few files. But I want to be able to stay up to date. – acme Mar 18 '11 at 13:42
  • In that case just `git svn clone --stdlayout ` is, as Simon Richter's answer suggests, the right choice. However, you'll need to do some reading specifically on dealing with `git svn` repositories, since there are various `git svn`-specific steps you have to take if you want to be able to contribute back upstream. – Mark Longair Mar 18 '11 at 14:17
  • Thanks! I'll try it out. I don't need to contribute changes back as there are just some minor enhancements for a very specific usecase, so I really only need to be able to merge changes in main trunk on the svn server back to my git repository. – acme Mar 18 '11 at 15:56

2 Answers2

2

Look at git-svn, it is precisely for this use case.

Simon Richter
  • 28,572
  • 1
  • 42
  • 64
0

I now did it like this:

How do I import a third party lib into git?

Community
  • 1
  • 1
acme
  • 14,654
  • 7
  • 75
  • 109