views:

364

answers:

5

I have used "traditional" version control systems to maintain source code repositories on past projects. I am starting a new project with a distributed team and I can see advantages to using a distributed system. Given that I understand SourceSafe, CVS, and Subversion; what suggestions do you have for a Git newbie?

+8  A: 

The Git - SVN Crash Course is a good read for getting going.

John Topley
+1  A: 
Jonathan Tran
...unless you command "git diff foo/bar.file"
Henrik Paul
+2  A: 

Do the tutorial

Then play around with it. Do a little toy project to get a feel for it before you starting working with your main codebase.

I use gitk a lot to review patches and track how the code changes from commit to commit.

James Dean
A: 

I tried git in my company. We used CVS and wanted to move to a better VC tool. We have chosen git as a best tool for files versioning (Linus on GIT). Its performance is just the best and it is a really great tools for a developer who understands version control in-depth but It is a nightmare for a regular developers who uses version control in background and don't want learn how to use for more than few hours (and they do need to learn a lot)

Also it's integration with existing IDEs is far away for being complete. The whole usability is pretty big issue for a regular developer.

After a pilot with 4 developers we switched to Subversion as simplest although not so superior tool.

There is also commercial solution for Subversion MultiSite (which we didn't try yet but will try shortly) - WANDisco

Pini Reznik
+4  A: 

In my own experience moving from Subversion to Git, the most important thing is not what you need to learn, but what you need to unlearn. Distributed Version Control is very different from Centralized Version Control. CVC is a subset of DVC, so you can just do CVC in a DVC tool, but it will be more complicated than with a CVC tool.

Try to unlearn CVC, and get in the DVC mindset. If you just end up doing CVC in a DVC tool, you will merely be frustrated by all the added complexity and you will not realize what that added complexity is buying you in terms of flexibility.

All DVC tools have great and very powerful support for branching and merging. Use it. All the history is available at your fingertips. Use it. (For example: never comment out code, just delete it. You can always get it back, even on an airplane with no internet connection.)

One very important aspect of Git: all other tools have a more or less defined workflow. Git doesn't. Git is a DVCS workflow construction kit. This makes it sometimes hard to know what to do: you have to design and implement your own workflow (hint: use lots of shell scripts). I use Git for more than a year now, and I still haven't completely figured out my workflow yet.

Jörg W Mittag