开发者

Push a specific folder to github from a svn repository

开发者 https://www.devze.com 2023-01-29 18:12 出处:网络
I have a svn repository that I need to push a SDKs\' folder to a github repository. The catch is that I need to preserve the svn history related to the SDKs\' folder and push it, with their respective

I have a svn repository that I need to push a SDKs' folder to a github repository. The catch is that I need to preserve the svn history related to the SDKs' folder and push it, with their respectives 开发者_如何学Gocommit messages, to github.

I've created a git repository using git-svn but I'm stuck on what to do next. I've also tried to add a submodule, for the SDKs folder, but for some reason I can't push it back to the svn repository.


You can convert a SVN subdirectory to a git repo provided the SVN repo has the right structure (for tags especially)

Once that git repo exists,

  • it can be pushed to its own GitHub repo 'GitHub_SDK'
  • it can be reference by your original GitHub repo as a submodule

That way, any modification made to that submodule will end up in your independent GitHub_SDK repo (or its local copy) and can be pushed back (git svn dcommit) to its SVN repo.

0

精彩评论

暂无评论...
验证码 换一张
取 消