Tips on using Git with svn in presence of a large number of svn externals

試著忘記壹切 提交于 2019-12-11 05:41:26

问题


I have a workflow(on svn) which I am trying to replicate with git, but am unable to.

I have a large number of Django apps (which are plugged together to form a form a full project) Some of these are in one large repo and others are in smaller repos.

My layout looks something like,

app1 -> repo1/app1
app2 -> repo2/app2
app3 -> repo1/appp3

templates/app1 -> repo1/templates/app1
templates/app2 -> repo2/app2/templates/app2
templates/app3 -> repo1/templates/appp3

site_media/app1 -> repo1/media/app1
site_media/app2 -> repo2/static/app2
site_media/app3 -> repo1/media/appp3

So I work in the correct app repos, and when we want to update any given project, we just do a svn up and svn exterbal takes care of the rest. How do I get this workflow in Git.


回答1:


You want to use git submodules, and this prior SO question addressed integrating svn repos into a git project.




回答2:


You may clone your SVN repository with SmartGit to get Git repostiory with .gitsvnextmodules file generated. SmartGit will display all your submodules and clone (you may control how deep) them to local Git repositories too. So you'll get the same structure and workflow but Git-based.



来源:https://stackoverflow.com/questions/1894493/tips-on-using-git-with-svn-in-presence-of-a-large-number-of-svn-externals

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!