GitHub
& Rstudio
for collaborative codingIn this exercise, each participant will fork a GitHub repo, and contribute a file required to simulate the evolutionary trajectory of an imaginary species’ body size.
We’ll use GitHub to collate all species files and plot them all up together at the end! We’ll also discover the skull and beak shapes associated with each simulated species size.
make your own copy of the repository on GitHub
GitHub makes a copy into your account
clone it: copy repo link to initiate Rstudio project
Create new project
Checkout from version control repository
Clone project from a git repository
Paste repo link copied from GitHub into Repository URL field. Click Create Project
.
Rstudio project now contains all files from the GitHub repo.
open params/params_tmpl.R
.R
script in params/
folder
Use species name of your choice to name new file. Please !!DO NOT OVERWRITE params/params_tmpl.R
!!.
edit file with parameters of your choice and save.
NB: remember to save the changes to your file
sig2
: A numeric value greater than 0 but smaller than 5
species.name
: a character string e.g. "anas_krystallinus"
. Try to create a species name out of your name!
color
: a character string e.g. "red"
, "#FFFFFF"
(Check out list of colours in R)in the git tab, select the new file you created and click Commit
. ### !! Please ONLY COMMIT YOUR NEW FILE !!
write an informative commit message and click Commit
your new file has now been commited
on the git tab click ⇧ to push changes to GitHub
changes have now been updated in the GitHub repo
in your repository, create new pull request
to merge fork to master repo (ie the original repo you forked)
GitHub checks whether your requested merge creates any coflicts. If all is good, click on Create pull request
write an informative message explaining your changes to the master repo administrators. Click on Create pull request
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!