BIRCH/Getting going with git

From Bioinformatics.Org Wiki

Jump to: navigation, search

Why Git

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:

  1. Git is faster
    1. 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.
    2. Git doesn't store diffs (that is, deltas between different versions of files), it stores entire modified files as binary blobs.
  2. Git is smart
    1. 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.
  3. Branching is free in Git:
    1. 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!
  4. Git hooks:
    1. 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.
  5. Git IS the Open Source version control system to use:
    1. It was written by Linus Torvalds, and is used by projects like the Linux Kernel, Webkit, and WINE.
    2. 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".

Personal tools
Namespaces
Variants
Actions
wiki navigation
Toolbox