Recently I have learned the basics concepts of Git. We did use a bit of git-svn to get familiar with using it. I would like to start my first ‘true’ project on git along with my friends.
Therefore I would like to ask you what are the best practices of using Git in general, and if there are any pitfalls that SVN familiar developer my get into?
Collaboration among more than one developer is probably best done using a central ‘bare’ repository, which is roughly analogous to a repository in Subversion. Sharing changes between two or more people with only their own repositories, is difficult and prone to error. Also, using a central repository will feel more comfortable coming from a Subversion background.
One great thing about Git is that you can easily have more than one ‘common’ repository. I have my development set up so I keep a set of bare repositories on one server that I usually interact with (‘origin’ for most of my projects), but for some projects I also push the whole thing up to GitHub. I don’t have to choose which one is the single central repository, I can pull and work from the GitHub repository and later push to my own copy.