简体   繁体   中英

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.

  • 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

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? .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM