What is Git
The main difference between Git and all the other main SCS like CVS, SVN, TFS is that Git is a "distributed version control system". This means that when you are working, you are doing against your own “clone” of the repository, you do check-ins locally, and then you push the changes up to the master version of the repository.
Given it's distributed nature, Git makes easier contributing to opensource projects, but it has development workflow a bit different from the other SCS.
I’m not going deeper into the details as there are tons of tutorials, including a series of screencasts: GitCasts.
How I started contributing to Ninject
To give you an example of what the “contributing” workflow is like, I’ll use the steps I followed to start contributing to Ninject (so all urls will be the Ninject’s ones)
- I forked enkari/ninject project
- Then I cloned (copied locally) my forked repository:
git clone email@example.com:simonech/ninject.git
- This created the repository in folder named “ninject”, so, for the following commands to work, I moved to that folder:
- then an important step: I bound my repository to the original one, so that I could keep it in sync with the changes Nate does to the main repository:
git remote add upstream git://github.com/enkari/ninject.git
Notice that here I used the clone url of the original repository (not mine)
- To get changes that were made to the original repository I’d do:
git pull upstream master
- Since the last command copied it to my local repository, I’ve then to push it back to my online one:
But there is lot more
Here was just a very brief introduction on how to get started with Git. As I said at the beginning there are tons of tutorials available. I’d suggest the following:
- Git/Github survival guide by Ivan Porto Carrero: it’s a kind of cheat sheet with all the useful commands that you will use 90% of the time with Git
- Hosting your OSS project on github by Aaron Jensen: how to get started with GitHub and how to manage an opensource project with GitHub
- Understanding Git Conceptually: a detailed explanation of the concepts behind Git
- Getting Started with Git and GitHub on Windows by Kyle Cordes: everything, from installing the software to sending patches
- An Illustrated Guide to Git on Windows: a step-by-step guide with screenshots of how to start using Git on Windows
A bit thanks goes to Ivan which helped me getting started with this in a long online session.
Hope this helps.