Version Control in Bioinformatics: Our Experience Using Git

20
Version Control in Bioinformatics Our Experience Using Git Neil Saunders MATHEMATICS, INFORMATICS AND STATISTICS www.csiro.au

description

Basic intro to Git for bioinformaticians yet to employ version control. Presented at CSS/FOAM 2013, Melbourne, Australia.

Transcript of Version Control in Bioinformatics: Our Experience Using Git

Page 1: Version Control in Bioinformatics: Our Experience Using Git

Version Control in BioinformaticsOur Experience Using Git

Neil Saunders

MATHEMATICS, INFORMATICS AND STATISTICSwww.csiro.au

Page 2: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 2 of 21

Genesis - Yammer

Page 3: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 3 of 21

Why?

Surely everyone uses version control?

Page 4: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 4 of 21

Evolution of a self-taught programmer

“One file, no versions”

Page 5: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 5 of 21

Evolution of a self-taught programmer

“Versions as multiple files”

Page 6: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 6 of 21

Evolution of a self-taught programmer

Version Control!

Page 7: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 7 of 21

Choices

http://en.wikipedia.org/wiki/Comparison of revision control software• lists 34 software packages• of which 26 are “actively developed”• and 10 use the distributed repository model

Page 8: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 8 of 21

Git

http://git-scm.com/

Page 9: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 9 of 21

Start with a good file hierarchy

and a good .gitignore file

Page 10: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 10 of 21

Initialize the repository

git init

Page 11: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 11 of 21

Add files

git add .

Page 12: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 12 of 21

Commit changes

git commit -a -m “Initial commit”

Page 13: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 13 of 21

That may be all you need

Page 14: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 14 of 21

Repositories

Redmine + Gitolite

Page 15: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 15 of 21

Cloning a remote repository

git clone [email protected]:malaria.git

Page 16: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 16 of 21

Pushing to a remote repository

git push origin master

Page 17: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 17 of 21

Updating from a remote repository

git fetch origingit pull origin

Page 18: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 18 of 21

More advanced - all Git commands

Page 19: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 19 of 21

Github: social coding

Page 20: Version Control in Bioinformatics: Our Experience Using Git

Version Control: Slide 20 of 21

BioMed Central + Github

http://blogs.biomedcentral.com/bmcblog/2013/02/28/github-and-biomed-central/