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

发布于 2024-08-20 14:24:57 字数 244 浏览 9 评论 0原文

目前我所在的一个小组使用 SVN。我们正在考虑迁移到 git。我个人使用过 git(并且实际上使用 git-svn 桥接回主 SVN 存储库),所以我确信它的好处。

一个问题是 git 比 SVN 更复杂。我们有一些全新的人员需要从头开始学习版本控制。有人有直接跳进 git 来教授版本控制的经验吗?我想知道这是否会太多,或者是否可能更容易不必忘记基于 SVN 的期望。

有没有人有这两种方法的经验 - 直接跳到 git,或者先熟悉 svn?

Currently a group I am a part of uses SVN. We are looking at moving to 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.

One concern is that git is more complex than 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? I am wondering if it would be just too much or if it might be easier not having to unlearn SVN based expectations.

Does anyone have any experience of either approach - jump straight into git, or get familiar with svn first?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

小矜持 2024-08-27 14:24:57

使用你将要使用的东西。没有理由浪费时间去养成不适合您的生产环境的习惯。源头控制不是脑外科手术——不要让它变得比原来更难。

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.

满栀 2024-08-27 14:24:57

我认为这可能取决于用户的数量和你拥有的设置,对于没有太多分支或特殊功能的小用户群来说学习 Git 实际上非常简单,并且源代码控制的核心概念是相同的。当您获得具有多个分支机构和开发人员的更复杂的项目管理策略时,情况就开始出现分歧。

所以,如果你有一个小团队,我会建议直接跳入 Git。

如果您有一个更大的团队并且直接跳入 Git,那么一旦您更好地了解了系统,您可能需要重新配置如何设置存储库。

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. 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.

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.

無心 2024-08-27 14:24:57

git 的学习曲线简直就是地狱。学习一点点很容易,但也很危险:-)
然而,从很多方面来说,它是一个很好的工具,而且我认为首先学习 svn 不会为您的用户带来很好的服务。 git 的许多优点(分支和合并、克隆、断开连接的提交)在 svn 上下文中没有意义,或者它们的工作方式不同。

以下是我在教人们 git 时告诉人们的一些事情:

  • Git Magic 开始。
  • 不要指望一切都有意义。
  • 从表面上看,git 命令看起来非常强大且正交,因此许多组合都可以工作。别被愚弄了。并非所有组合都有效;例如,切勿尝试推送到已签出工作文件的存储库,尤其是当它们发生更改时。瞬间亏损!
  • 坚持 git 设计的模型:每个开发人员维护一个工作存储库和一个公共存储库。您对工作存储库进行更改,将其推送到您的公共存储库,并从其他开发人员的公共存储库中提取。
  • 不要忘记拉力不是推力的对偶;拉动也会进行合并。
  • 不要忘记,在提交所有本地更改之前您无法合并。
  • 要管理提交和索引,请使用 git-gui :-)

The learning curve for git is pure hell. 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. Many of the strengths of git (branching and merging, cloning, disconnected commits) don't make sense in a svn context, or they work differently.

Here are some of the things I tell people when I'm teaching them git:

  • Start with 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. 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. 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 :-)
南街九尾狐 2024-08-27 14:24:57

我不知道哪个更好,但是 git 暴露了一些关于源代码控制的“更高层次”的思考,我希望我知道这些,即使我只知道 svn...

如果你能处理学习曲线,我推荐 git。

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...

If you can handle the learning curve, I'd recommend git.

热风软妹 2024-08-27 14:24:57

我处于类似的位置:使用 git-svn 而其他人使用普通 svn。对我们来说,不同之处在于我们从 VSS 转向了 SVN。尝试教人们有关原子提交的知识已经够困难的了,我认为我们不会尝试强制使用 git。

如果你有新人,我会直接使用 git,因为当你有本地提交和

变基-i

I'm in a similar position: using git-svn while others use plain svn. The difference for us is we came off of VSS to SVN. Trying to teach people about atomic commits was hard enough, I don't think we'll ever try forcing 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

rebase -i

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文