使用 eclipse 进行单人项目的版本控制?

发布于 2024-09-06 19:24:02 字数 1539 浏览 4 评论 0原文

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

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

发布评论

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

评论(7

信愁 2024-09-13 19:24:02

我推荐几乎任何分布式版本控制系统。我愤怒地使用过 git 和 hg,并戳过 fossil(我将其包含在内,因为它提供了 git 所没有的一些功能) /code> 和 hg 缺少)。我将分解我眼中的主要优点和缺点(注意:如果它们都具有相同的优点,我不会提及它,例如,它们都快速且轻量级):

  • git
    • 优点
      • 非常灵活
      • GitHub
    • 缺点
      • 陡峭的学习曲线
      • 更灵活
      • 我上次查看时 Eclipse 集成很糟糕
  • hg 时感觉很糟糕
    • 优点
      • (IMO)命令更加一致
      • 灵活性较差
      • 比特桶
    • 缺点
      • 灵活性较差
      • 没有 git 那么大的动力
    • 注意事项
      • 我最近没有检查 Eclipse 支持;它曾经比 git 更好,但似乎相当停滞
  • fossil(免责声明:我没有在愤怒中使用过这个)
    • 优点
      • 由 SQLite 背后的人编写,因此您可以相当确定它是SOLID代码
      • 提供的不仅仅是版本控制,例如分布式错误跟踪器
      • 易于设置供其他人访问
    • 缺点
      • 不如 githg 的势头
      • 我非常确定 fossil 的 Eclipse 集成不存在(这是我最后一次查看)
      • 据我所知,没有与 GitHub 或 BitBucket 并行的免费托管,因此您实际上必须自己托管您的存储库

还有其他 DVCS,特别是包括 darcsbzr,但我还没有充分使用它们,无法对它们提出有价值的意见。

I'd recommend pretty much any of the distributed version control systems. I've used git and hg in anger, and poked at fossil (I include it because it offers some features that git and hg lack). I'll break down the major pros and cons in my eyes (NOTE: if they all have the same advantage I'm not going to mention it, e.g., they're all fast and lightweight):

  • git
    • Pros
      • Very flexible
      • GitHub
    • Cons
      • Steep learning curve
      • More flexible
      • Eclipse integration was lame the last time I looked
  • hg
    • Pros
      • (IMO) more consistent commands
      • Less flexible
      • BitBucket
    • Cons
      • Less flexible
      • Doesn't have quite as much momentum as git
    • Caveats
      • I haven't checked on Eclipse support lately; it used to be better than git's, but seemed rather stagnant
  • fossil (disclaimer: I haven't used this one in anger)
    • Pros
      • Written by the man behind SQLite, so you can be fairly sure it's SOLID code
      • Provides more than just version control, e.g., a distributed bug tracker
      • Easy to set up for others to access
    • Cons
      • Not nearly as much momentum as git or hg
      • I'm pretty sure Eclipse integration for fossil is non-existent (it was the last time I looked)
      • No free hosting that I know of to parallel GitHub or BitBucket, so you actually have to host your repo yourself

There are other DVCSs out there, notably including darcs and bzr, but I've not used them enough to have a worthwhile opinion on them.

一个人的旅程 2024-09-13 19:24:02

a/ 有必要有一个 VCS

b/ CVCS 和 DVCS 有很大不同

c/ Eclipse 目前是 将其所有项目移至 Git(并且在 EGit 上进行改进),因此 Git 将成为 Eclipse 上的 VCS 目标。

a/ It is necessary to have a VCS

b/ CVCS and DVCS are quite different

c/ Eclipse is currently moving all its project to Git (and is improving on EGit), so Git will be the VCS target on Eclipse.

彼岸花ソ最美的依靠 2024-09-13 19:24:02

Git,因为您可以立即开始,不需要中央存储库服务器。

其他一些优点(与其他 SCM 相比):

  • 文件系统更简洁:Git 只在存储库的根目录创建一个文件夹(与 SVN 不同)。
  • 不会过多干扰“正常”文件处理功能。例如,在 SVN 中,您需要使用自定义命令来重命名或移动文件。 Git 的情况并非如此。

我感觉 Git 非常轻量级,所以没有理由等到你的项目“足够大”或者其他什么的。

Git, because you can start right away and don't need a central repository server.

Some other advantages (compared to other SCMs):

  • Less cluttered filesystem: Git only creates a folder at the root of the repository (unlike e.g. SVN).
  • Does not interfere that much with "normal" file handling functions. E.g. in SVN you need to use custom commands to rename or move files. That is not the case with Git.

I have the feeling Git is very lightweight, so there no reason to wait until your project is "big enough" or whatever.

朦胧时间 2024-09-13 19:24:02

您的评论使您看起来真正的问题是您是否真的需要使用版本控制,因为这是一个单人项目。

设置和使用 git 或 Mercurial 只需很少的时间。去做就对了。如果你不需要它,你就损失了几分钟的时间。如果您确实需要它,它可能会为您节省数周的时间。

Your comment makes it seem like your real question is whether or not you really need to use version control, given that it's a one-person project.

It takes very little time to set up and use git or mercurial. Just do it. If you don't need it, you've lost a few minutes. If you do need it, it could potentially save you weeks.

热风软妹 2024-09-13 19:24:02

据我了解,这只是你最喜欢哪种版本控制系统的问题。

但我认为性能最好的系统可能是 git。 http://www.eclipse.org/egit/ 对于 eclipse 插件:)

我会推荐无论如何都要使用版本控制系统。即使在小型项目中,您也会很快意识到以前的解决方案可能会更好。如果没有版本控制系统,您将很难恢复更改或恢复到以前的版本(好吧,这是这些系统的巨大优势之一,对吗?;))。

As far as I understand, it is just a question of which version control system you prefer most.

But the most performant system is probably git I think. http://www.eclipse.org/egit/ for the eclipse plugin :)

I would recommend to use a version control system anyway. Even in small projects you will come very fast to the point that a previous solution maybe would have been better. Without a version control system you will do hard reverting changes or revert to previous versions (well, that is one of the great advantages of these systems, right? ;) ).

烛影斜 2024-09-13 19:24:02

Git 和 Mercurial (hg) 作为分布式源代码存储库确实有很大的动力,但在我看来,对于一个人乐队来说,您会发现 Subversion 提供了最大的支持。如果您使用的是 Windows,那么 TortoiseSVN shell 集成非常棒(它甚至与 Trac 集成),并且免费的 Subversion 托管无处不在,并且对 ProjectLocker.com 有一些个人经验(他们支持 Git 和 SVN)。此外,Subversion 可以非常简单地直接集成到 Eclipse IDE 中。

Git and Mercurial (hg) do have a lot of momentum as distributed source code repositories but in my opinion, for a one man band, you will find the most support with Subversion. If you are in Windows there's TortoiseSVN shell integration which is fantastic (it even integrates with Trac) and free Subversion hosting is all over the place and have some personal experience with ProjectLocker.com (they do Git and SVN). Also, Subversion is pretty straightforward to get integrated directly into the Eclipse IDE.

浅忆流年 2024-09-13 19:24:02

即使对于一个人来说,使用 SCM 而不是仅仅使用 Eclipse 历史记录也有很多好处:

  • 对提交的评论:您可以说出为什么要做某事。当您需要根据某些代码的历史记录来找出为什么它会这样做时,这将为您提供帮助。

  • 备份:哦,你把 Eclipse 工作区完全搞乱了?只需创建一个新的,并提取一份新的代码副本即可。

  • 持续集成:检查代码是否在每次保存后构建,运行测试(这很重要),并创建实际的二进制文件发送给客户。

    持续集成

这是您的安全网。花时间学习它,并正确使用它。你最终会喜欢它的:)

There are many benefits from using a SCM instead of just Eclipse histoiry even for just a single person:

  • comments on commits: you can say WHY you did something. This will help you when you need to figure out why some code does as it does, based on its history.

  • backups: Oh, you messed up your Eclipse workspace completely? Just create a new one, and pull in a fresh copy of the code.

  • continuous integration: check that code builds after every save, runs tests (this is important), and creates the actual binary to send to the customer.

It is your safety net. Take the time to learn it, and use it right. You will end up liking it :)

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