简体   繁体   English

在同一工作树上独立使用git和svn

[英]Using git and svn on the same working tree independently

I am in a classical situation: my company system is based on svn, and probably it won't be ever change. 我处于典型情况:我的公司系统基于svn,可能永远不会改变。 But I like git much better because of its extended functionality, stability, flexibility and speed. 但是我更喜欢git,因为它具有扩展的功能,稳定性,灵活性和速度。

Thus I try to use git on my development machine, but I want to make it invisible for the svn-centered software development (partially human-) infrastructure. 因此,我尝试在开发机器上使用git,但我想使它对于以svn为中心的软件开发(部分为人为基础)基础结构不可见。

Yes, I know there is gitsvn to bridge over the gap between git and svn. 是的,我知道有gitsvn可以弥补git和svn之间的差距。 But the hard truth is that I am really not satisfied with gitsvn, and the more doc I learn, I am more and more unsatisfied. 但是硬道理是,我对gitsvn确实不满意,而且我学到的文档越多,我就越不满意。

Currently I think it were better to me to simply abandon my git project and only use svn. 目前,我认为最好放弃我的git项目,而只使用svn。

I have an idea, which makes things a little bit complexer, but at least it will do exactly what I want. 我有一个主意,这会使事情有些复杂,但至少它可以完全满足我的要求。 My idea were to simply use svn and git on the same working tree independently. 我的想法是简单地在同一个工作树上单独使用svn和git。 I am thinking on this layout: 我在考虑这种布局:

.git/
    .gitignore (<- of course .svn here)
.svn/
    .svnignore (<- of course .git will be also ignored)
dir1/
dir2/
...

And I entirely ignored gitsvn. 我完全忽略了gitsvn。 I simply leaved it out from everything. 我只是把它从一切中遗漏了。 Of course, .git and .svn need to be invisible for both systems. 当然,.git和.svn对于两个系统都必须是不可见的。

I think, it were a hard in the sense, that I needed to keep in my brain the state of both VCS-s, but I think, I will use some type of in-house standards to do that. 我认为从某种意义上说,我需要把两个VCS的状态都记在脑子里很难,但是我认为我将使用某种内部标准来做到这一点。 For example, I used mainly git, and used svn only for the commits/updates to the central repository. 例如,我主要使用git,并且仅将svn用于对中央存储库的提交/更新。

I know, eclipse (and most IDE) weren't able to handle a such structure, but I think I could live with that. 我知道,eclipse(和大多数IDE)无法处理这样的结构,但是我认为我可以接受。

Anybody did the same already? 有人已经做了吗? What are the experiences? 有什么经验?

Working dir of Git and SVN Working Copy at the same tree is Bad Idea (tm) - you'll get twofold of headaches for the cost of one. Git和SVN工作副本在同一棵树上的工作目录是坏主意(tm) -您只需花上一头便会感到头痛。 Git-SVN per se is reasonable smart and hides a lot of troubles behind the scene (from my POV) Git-SVN本身是合理的智能,并且隐藏了很多麻烦(根据我的观点)

You can to think about using not just naked git-svn, but neatly tucked away in two-world clients: SmartGit is one of such tools 您可以考虑使用的不仅是裸git-svn,而且还巧妙地藏在两个世界的客户端中: SmartGit是这样的工具之一

Alternative bridge between Git and SVN is SubGit SubGit是Git和SVN之间的替代桥梁

SubGit was developed as an alternative to Git-Svn, so quite naturally SubGit does resolve many of the Git-Svn limitations. SubGit是Git-Svn的替代产品,因此SubGit很自然地解决了Git-Svn的许多局限性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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