Martin Prikryl
Martin Prikryl

Reputation: 202692

Linking SVN repository trunk as branch for Git repository subfolder

I have open source project in Git repository. In the project, I'm using source code of another open source project. That code is stored in Git repository subfolder. I'd like to add the SVN repository [interested in trunk only] as a branch, but only for that specific Git subfolder.

Note that I have modified the code of the other project, so I'm not looking for simple 1:1 copy. I just want to have an option to merge changes from the SVN to my Git repository, when I decide to do so. I will NOT need to commit back to SVN.

I've found How to use git-svn to checkout only trunk and not branches and tags?

But I do not know how to link it to a subfolder only.

Upvotes: 3

Views: 184

Answers (2)

Lazy Badger
Lazy Badger

Reputation: 97395

  • Convert subfolder or wrapper git-repo into submodule or subtree
  • Link nested repo (I may be wrong in case of subtree technique) with SVN-repo using git-SVN

Upvotes: 1

bahrep
bahrep

Reputation: 30672

It looks like that you want to implement a vendor branch. For example, see this thread How do I import a third party lib into git?.

Upvotes: 0

Related Questions