简体   繁体   English

首先使用git还是通过SVN学习版本控制?

[英]Learning version control with git first or via SVN?

Currently a group I am a part of uses SVN. 目前我是使用SVN的一部分。 We are looking at moving to git. 我们正在考虑转向git。 I have used git personally (and am actually using git-svn to bridge back to the main SVN repository), so I am convinced of its benefits. 我亲自使用了git(实际上我正在使用git-svn桥接回主SVN存储库),所以我确信它的好处。

One concern is that git is more complex than SVN. 一个问题是git比SVN更复杂。 We have some brand new folk who will need to learn version control from the beginning. 我们有一些全新的人,他们需要从一开始就学习版本控制。 Does anyone have any experience teaching version control by jumping straight into git? 有没有人有通过直接跳入git教授版本控制的经验? I am wondering if it would be just too much or if it might be easier not having to unlearn SVN based expectations. 我想知道它是否会太多,或者是否更容易不必忘记基于SVN的期望。

Does anyone have any experience of either approach - jump straight into git, or get familiar with svn first? 有没有人有任何方法的经验 - 直接跳到git,或先熟悉svn?

Use what you're going to use. 使用你将要使用的东西。 There's no reason to waste time picking up habits that aren't applicable to your production environment. 没有理由浪费时间养成不适合您的生产环境的习惯。 Source control isn't brain surgery - don't make it harder than it has to be. 来源控制不是脑部手术 - 不要让它变得更难。

I think it might depend on the number of users and the setup you have, learning Git for a small user base without too many branches or special features is actually very simple and the core concepts of source control are the same. 我认为这可能取决于用户数量和设置,为没有太多分支或特殊功能的小用户群学习Git实际上非常简单,源代码控制的核心概念是相同的。 Where it starts to diverge is when you get a more complex project management strategy with multiple branches and development staff. 当它与多个分支机构和开发人员达成更复杂的项目管理战略时,它开始出现分歧。

So, if you have a small team, I would say jump straight into Git. 所以,如果你有一个小团队,我会说直接进入Git。

If you have a larger team and you jump straight into Git then be prepared to realize you might need to reconfigure how you have setup your repositories at a later date once you understand the system better. 如果你有一个更大的团队并且直接进入Git,那么一旦你更好地理解了系统,你就会意识到你可能需要重新配置如何设置你的存储库。

The learning curve for git is pure hell. git的学习曲线是纯粹的地狱。 A little learning is easy, but is also dangerous :-) However, in many ways it is a nice tool, and I don't think your users will be well served by learning svn first. 一点学习很容易,但也很危险:-)然而,在很多方面它是一个很好的工具,我不认为你的用户会先通过学习svn得到很好的服务。 Many of the strengths of git (branching and merging, cloning, disconnected commits) don't make sense in a svn context, or they work differently. git的许多优点(分支和合并,克隆,断开连接的提交)在svn上下文中没有意义,或者它们的工作方式不同。

Here are some of the things I tell people when I'm teaching them git: 以下是我在教他们git时告诉别人的一些事情:

  • Start with Git Magic . Git Magic开始。
  • Don't expect everything to make sense. 不要指望一切都有意义。
  • At a superficial level, the git commands seem very powerful and orthogonal, such that lots of combinations work. 在表面层面,git命令看起来非常强大和正交,因此许多组合都可以工作。 Don't be fooled. 不要被愚弄。 Not every combination works; 不是每种组合都有效; for example, never try to push to a repository that has checked-out working files, especially if they have changes. 例如,永远不要尝试推送到已检出工作文件的存储库,特别是如果它们有更改。 Instant lossage! 瞬间损失!
  • Stick to the model that git was designed for: each developer maintains a working repo and a public repo. 坚持使用git设计的模型:每个开发人员都有一个工作回购和公共回购。 You make changes to your working repo, push them to your public repo, and pull from other developers' public repos. 您对工作回购进行了更改,将它们推送到您的公共回购,并从其他开发人员的公共回购中获取。
  • Don't forget the pull is not the dual of push; 不要忘记拉不是推的双重; a pull also does a merge. 拉也做合并。
  • Don't forget that you can't merge until all local changes are committed. 不要忘记,在提交所有本地更改之前,您无法合并。
  • To manage commits and the index, use git-gui :-) 要管理提交和索引,请使用git-gui :-)

I don't know which is better , but git exposes some 'higher level' thinking about source control that I wish I had known even when all I knew about was svn... 我不知道哪个更好 ,但是git暴露了一些关于源代码控制的“更高层次”的思考,即使我知道的所有内容都是svn,我希望我知道这些思想...

If you can handle the learning curve, I'd recommend git. 如果你能处理学习曲线,我会推荐git。

I'm in a similar position: using git-svn while others use plain svn. 我处于类似的位置:使用git-svn而其他人使用普通的svn。 The difference for us is we came off of VSS to SVN. 我们的不同之处在于我们从VSS到SVN。 Trying to teach people about atomic commits was hard enough, I don't think we'll ever try forcing git. 试图教人们关于原子提交是很难的,我认为我们不会试图强迫git。

If you have fresh people I'd go for straight git because version control is so much more compelling when you have local commits and 如果你有新鲜的人,我会选择直接git,因为当你有本地提交时,版本控制会更加引人注目

rebase -i rebase -i

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

相关问题 了解版本控制系统,Git,SVN - Learning about version control systems, Git, SVN 在Git和Svn版本控制下设置工作副本 - Set up a working copy under both Git and Svn version control 反对从svn切换到Git版本控制的任何理由? - Any reason against switching from svn to Git Version Control? 我们是否应该将 pod 文件提交到版本控制系统(GIT 或 SVN) - Should we commit pod files to version control system (GIT or SVN) 是否存在与大多数版本控制系统兼容的版本控制gui(git,svn,hg,cvs,也许是bzr) - Does there exist a version control gui that is compatible with most version control systems (git, svn, hg, cvs, perhaps bzr) Matlab 源代码控制 Git 和 SVN - Matlab Source Control Git and SVN Rstudio 上的版本控制 GitHub svn - Version control GitHub svn on Rstudio 是否可以在虚拟主机上设置Git / SVN版本控制? 与拥有个人本地服务器相比,优势是什么? - Is it possible to set a Git/SVN version control on a webhost? And what are the advantages compared to having a personal local server? 我可以使用一个服务器来存储/管理SVN / Git / Hg / etc的版本控制吗? - Is there a single server I can use to store/manage version control for SVN/Git/Hg/etc? 哪种版本控制工具最适合处理反射或循环合并? SVN,Git? - Which version control tool is best suited to handle reflective or cyclic merging? SVN, Git?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM