In the last two or three weeks, I had about five or six people IM'ing me "What's the best way to start with git?". Last time I wrote about this was almost 7 months ago, so I think its time for an update.
First, I personally compile git from source. I do not trust package maintainers yet. Some parts of git use ssh (for example), so they mark ssh as a dependency, and this brings their own version of ssh. Most often that not, I ended up with a broken ssh on my system. So, compile from source is my personal recommendation for now, until package managers understand
Second, git is still being developed at a fast pace. I recompile it once a month at least, and I follow the master branch. That is, after I compiled the latest stable release from a tarball, I clone the git repo and I install the master branch version. Usually a
make distclean && autoconf && make && sudo make install does it for me.
You will be happy with the official releases. There was a time that you had to wait a lot between releases, but now, they are coming out at a fairly decent pace. So sticking with the stable tarballs is a good enough option.
Regarding actually using git, I have three recommendations:
- Git Internals: costs $9 but worth every cent. By Scott Chacon;
- Getting git: presentation at RailsConf 2008 also by Scott Chacon;
- Git for Computer Scientists: one of my all time favorite explanations of the git internals. By Tommi Virtanen.
If you like dead-tree-stuff like me, watch out for the Pragmatic Version Control Using Git book (now in beta, PDF available), by Travis Swicegood.
For hosting your git repos, you can't go wrong with either Github or Gitorious. I'm using the fist one because I like all the user interface niceties, but the second is also available as GPL project that you can use on your own site.