BIRCH/Getting going with git
From Bioinformatics.Org Wiki
As anyone on the project should know by now, I've been pushing to get the project on SVN for, well, almost 8 months now. A very fair question is "why Git all of a sudden?"
The answer is pretty simple: Git is just better. It is easier to work with, while offering more power when we need it.
I won't go into too much detail, but here is a quick list of why Git is better than SVN:
- Git is faster
- Git, as a distributed version control system, does not require a network connection until you want to synchronize with another repository. This means that you can work with git while you are on an airplane, and still take full advantage of all of the power that git has to offer.
- Git doesn't store diffs (that is, deltas between different versions of files), it stores entire modified files as binary blobs.
- Git is smart
- Git automatically keeps track of the files you modified, so there is no need to add them manually - a tedious operation. All you need to do is tell Git about new files that you want it to watch.
- Branching is free in Git:
- Because of the way Git is implemented, it is common to make a branch for every task you perform, and then simply merge it when you are done. Switching branches is easy and fast, it almost seems like magic!
- Git hooks:
- Git allows for executable scripts ("hooks") to be run automatically and transparently. This means that Git will let us easily keep track of filesystem metadata like timestamps and permissions, even though it doesn't actually store them.
- Git IS the Open Source version control system to use:
- It was written by Linus Torvalds, and is used by projects like the Linux Kernel, Webkit, and WINE.
- Anyone anywhere can submit their changes to git easily by mailing in a git patch. This allows for changes to be easily reviewed with a tool like "meld".
What needs to be done to get on Git?
Almost nothing. Right now, psgendb could put itself on Git by simply executing:
git init git add FOLDER #for each folder in BIRCH
For me to put psgendb on git, I will need for the permissions of all BIRCH files to be changed to allow group reading, and preferably group writing. This way, psgendb's BIRCH becomes just another Git repository: there is no longer any need for a reference copy!
After all of the BIRCH files have been added to git, I will add my Git hooks to store the permissions and timestamps, then we can push psgendb to a Git server, where all developers will be able to access it.
If we ever decided we needed to remove psgendb from Git, it would be as simple as:
rm -rf .git
What do developers need to do to contribute?
All that they need to do is email me their public key (~/.ssh/id_rsa.pub). If this doesnt exist, they will have to create it with "ssh-keygen".