version control for one-man project using eclipse? [closed]

我的梦境 提交于 2019-11-28 18:49:28
VonC

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.

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.

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.

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.

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? ;) ).

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.

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 :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!