git &同一代码库上的 SVN
我有一个代码库,需要通过 git 和 svn 来跟踪,因为两个团队使用不同的做法来处理代码。
我遇到的问题是 git 将所有 .svn 目录存储在其存储库中。我可以使用一个非常大的 .gitignore 文件并为每个文件夹指定每个 .svn 目录的每个实例,但这似乎很麻烦。
我能做什么,或者我被迫停止使用 Git 并使用 SVN 和 SVN? SVN 组合与不同存储库的 switch 命令?
git-svn这个工具适用吗?似乎不是我能理解的。
谢谢。
I have a code base that needs to be tracked by both git and svn due to two teams working on the code with different practices.
The problem I am having is that git is storing all the .svn directories in its repo. I could use a very large .gitignore file and specify every single instance of every .svn directory for every folder but that seems cumbersome.
Is there anything I can do, or am I forced to stop using Git and use SVN & SVN combo with a switch command for different repos?
Is the tool git-svn applicable? Doesnt seem to be from what I can understand.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
告诉其中一个团队(最好是 SVN 团队)不要再成为阻碍者,并使用与其他团队相同的 VCS。
如果不可能,您将必须使用 SVN 作为中央存储库,并为其他团队使用 git-svn。
然而,这非常混乱,并且您无法使用 git 的所有优秀功能 - 所以如果 SVN 团队切换到 Git,情况就会如此。
Tell one of the teams (preferably the SVN one) to stop being a blocker and use the same VCS the other team uses.
If that's not possible, you'll have to use SVN for the central repository and
git-svn
for the other team.However, that's pretty messy and you cannot use all the nice features of git - so it would be if the SVN team switched to Git.
只需将
.svn
放入.gitignore
中,Git 就会在树中的任何位置匹配它。是的,git-svn
可能非常有用,如果主要存储库是 SVN。Just put
.svn
in your.gitignore
, Git will match it everywhere in the tree. And yes,git-svn
may be very useful, if the main repo is the SVN one.我的理解正确吗?你们有两个团队处理相同的代码,但是独立的?
我不会那样做。想象一下,团队 1 更改了代码中的某些内容,而团队 2 并不知道(因为它有自己的存储库)。尽管如果它们只是共享相同的代码库,则可以轻松地使用带有分支的单个存储库。
Do i understand you right, you have two teams working on the same code, but independent?
I wouldnt do that. Imagine Team 1 changing something on the code and Team 2 doesnt know about it (since it have its own repository). Although if they just share the same code BASE, one could easily use a single repository with branches.