开发者

Any reason against switching from svn to Git Version Control?

I have been for a long time now, a happy svn user. Lately I find myself often disconnected from my repository so 开发者_StackOverflowI'm considering a switch to Git.

Given the fact that I work alone on most of these projects. I'm interested to know if Git is overkill for small projects? Are there many gotchas ahead? is there a very different workflow or a great learning-curve?


I definitely recommend making the switch, but note that it will take some work. If you find yourself thinking "Oh, [this git concept] is just like [that svn concept]!" be careful, because it may in fact be very different. For example, svn revert means to throw away uncommitted changes. git revert means to create a new commit that undoes the changes that were introduced by one or more existing commits, kind of like an svn "reverse-merge". The git command that is closest to svn revert is probably git checkout. Also, many git commands act on the entire repository, whereas with an svn background, you might expect them to only work on the current subdirectory.

Is git better? IMHO, absolutely yes. But are there some gotchas? Yes.


I think the only reason not to switch from SVN to git is the time you'll need to learn the new system. Of course, if that were a very strong reason, we'd all still be using punch cards. IMHO, familiarity is the only thing SVN has going for it.


Git works fine for small projects.

I have a small Lisp utilities library here: https://github.com/pnathan/batteries. As you can tell, it is tiny.

You will find the workflow to be much more flexible, particular in the area of branching. The learning curve used to be notoriously poor, but there's a good deal of tutorials out there.

Typically you can do your svn workflow real easy in git:

workwork

commit -a -m "my message"

push

goto workwork

That won't use the full power of git, but it will get your needs satisfied.


If you're already proficient with SVN and you often use it on your own, why not setup a local SVN repository? DVCS really shines with groups of people contributing to the same project. If you're not running into any of the common Subversion problems in your normal development cycle why switch?

That being said, I am much happier now that I'm using a DVCS (Mercurial) and would likely use it or Git even on solo projects. We switched because of merge issues in SVN, so there was a legitimate problem which caused us to try a new system.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜