This document outlines a lesson on using version control with GitHub for bioinformatics. It introduces version control and GitHub, provides exercises for students to practice creating and collaborating on repositories, including adding and committing files, pushing and pulling changes, resolving conflicts, and submitting pull requests. The lesson aims to help researchers promote sharing, collaboration and reproducibility in their work.
6. • cd Desktop
• mkdir Dracula-Planets
• cd Dracula-Planets
• cd Desktop
• mkdir Wolfman-Planets
• cd Wolfman-Planets
Wolfman
Dracula
http://b-maze.deviantart.com/art/Werewolf-vs-Dracula-124893530
7. Blischak et al. 2016. A Quick Introduction to Version
Control with Git and GitHub. PLOS Comp Biol
8. Exercise
• Create a new file about a planet
• Add the file.
• Commit the file with a message
• Update the file with some additional information
• View the difference between the files
• Add and commit the updated file.
• Place your yellow sticky note on your computer when done
9. Brainstorm
• What are some files or types of files you might want
your version control system to ignore?
• Note: Github has a strict strict 100 MB size limit
11. Blischak et al. 2016. A Quick Introduction to Version
Control with Git and GitHub. PLOS Comp Biol
12. GitHub Online Repositories
• Go to github.com
• Sign in to your account
• Place your yellow sticky note on your computer
when done
13.
14.
15. Exercise
• Create a new repository
• desktop directory name == online repository name
• i.e. either Wolfman-Planets or Dracula-Planets
• Add the remote origin
• Push from the local desktop master to the online
remote origin
• Place yellow sticky note on laptop
18. Exercise
• Navigate back to your desktop
• Clone the your collaborators repo with
• Navigate into the cloned repo
• Create earth.txt
• Add, commit, and push earth.txt
• Place yellow sticky note on laptop
20. Exercise
• Navigate back to the directory you created earlier.
• View the git status.
• Pull your collaborator’s changes. View the git status.
• Create a README.md file.
• Add, commit, and push the README.md file
• Place yellow sticky note on laptop
21. Brainstorm
• How can we promote discoverability and usability?
• How do we collaborate and attribute credit?
• How do we balance sharing and privacy?
23. Blischak et al. 2016. A Quick Introduction to Version
Control with Git and GitHub. PLOS Comp Biol
24.
25.
26. Exercise
• Navigate to CCBBatUT/WolfmanDraculaCollaboration
• View the issues
• Create a new file for one planet
• Submit a pull request with a commit message and an
additional comment
• View the issues again
• Place yellow sticky note on laptop
27. Supported by the Software Carpentry Foundation and The
Center Computational Biology and Bioinformatics and The
28. • Lesson template: http://swcarpentry.github.io/git-novice/
• Lesson publication: https://zenodo.org/record/
57571#.WRjDs1KZN-U
• Related video of this lesson: https://www.youtube.com/watch?
v=hKFNPxxkbO0
• Blischak et al. 2016: http://journals.plos.org/ploscompbiol/
article?id=10.1371/journal.pcbi.1005412m
• Example repos: https://github.com/mkuzak/planets and https://
github.com/CCBBatUT/WolfmanDraculaCollaboration
• Images: https://xkcd.com/1597/ and http://b-
maze.deviantart.com/art/Werewolf-vs-Dracula-124893530