github
"The need for a logical way to organize and control revisions has existed for almost as long as writing has existed, but revision control became much more important, and complicated, when the era of computing began."
long been used to maintain code repositories in the software industry
especially in open source software
science increasingly computational
demands for increased openness
can be overwhelming
can be extremely powerful
ideal for managing the full suite of research outputs such as datasets, statistical code, figures, lab notes, and manuscripts.
…and super-charge your teams!
…or get left behind
Code Cafe Style tutorial by Mike Croucher
In this exercise, each participant will be forking a repo in order to create and contribute a trendline for the evolution of a trait in an imaginary species.
We’ll use github to collate the trendlines for all our species and plot them up all together!
github: make your own copy of the repository** on github
github: Github makes a copy into your account
github: clone it: copy repo link to initiate Rstudio project
rstudio: Create new project**
rstudio: Checkout from version control repository
rstudio: Clone project from a git repository
rstudio: Paste repo link copied from Github into Repository URL field. Click Create Project
.
rstudio: Rstudio project now contains all files from the github repo.
rstudio: open params/params_tmpl.R
rstudio: save as new .R
script in params/
folder. Use species name of your choice to name new file
rstudio: edit file with parameters of your choice and save.
rstudio: in the git tab, select the new file you created and click Commit
rstudio: write an informative commit message and click Commit
rstudio: your new file has now been commited
rstudio: on the git tab click ⇧ to push changes to Github
rstudio: changes have now been updated on Github repo
github: in your repository, create new pull request
to merge fork to master repo (ie the original repo you forked)
github: github checkes whether your requested merge creates any coflicts. If all is good, click on Create pull request
github: write an informative message, explaining your changes to the master repo administrators. Click on Create pull request
github: check original repo to see your merged changes
.R
script. Name it using your selected species name.We’ll merge all contributions and plot them together at the end!
Karthik Ram’s article: ‘Git can facilitate greater reproducibility and increased transparency in science’
Getting started with GitHub from materials for a software carpentry course at UBC
Slides for lecture Karl Broman gave on git/github, with notes
joeyklee’s friendly github intro. Mozilla Science Lab workshop