GitHub for Collaboration
Malvika Sharan
References: Mozilla Science Lab's Study Group Orientation, �Friendly GitHub Intro by Kirstie Whitaker & GitHub Collaborating Document by Malvika Sharan and Esther Plomp
Visual description: https://learngitbranching.js.org/
All slides are CC-BY 4.0
Open Life Science
Links
GitHub for Collaboration - Line 70 onwards on the Etherpad
Roadmap
Collaborative
Documents
Image. The Turing Way project illustration by Scriberia. Used under a CC-BY 4.0 licence. DOI: 10.5281/zenodo.3332807.¶
There are challenges in developing collaborative documents...
Image. The Turing Way project illustration by Scriberia. Used under a CC-BY 4.0 licence. DOI: 10.5281/zenodo.3332807.¶
There are challenges in developing collaborative documents...
VERSIONS!
Collaborative
Documents
Image from Mozilla Science Lab: https://mozillascience.github.io/study-group-orientation/3.1-collab-vers-github.html
Image from Mozilla Science Lab: https://mozillascience.github.io/study-group-orientation/3.1-collab-vers-github.html
Revisions and Versions
Images from Mozilla Science Lab, Illustration by Scriberia and The Turing Way
Images from Mozilla Science Lab, Illustration by Scriberia and The Turing Way
Version Control
Management of changes, called revisions, to a file
Revision: Change associated with a timestamp and details like what changes were made, who changed them, why etc.
Version Control
Management of changes, called revisions, to a file
We can Collaborate on GitHub
Image from Mozilla Science Lab: https://mozillascience.github.io/study-group-orientation/3.1-collab-vers-github.html
GitHub wut!?
Slide by Sophia Batchelor, https://zenodo.org/record/5070361
PAUSE!!!
Do you have a GitHub Account?
Go to https://github.com/
Slide by Sophia Batchelor, https://zenodo.org/record/5070361
GitHub Exercise!
First Repo
“friendly-collab-party”
Repository (Repo)
A project where all your files are, online or on your computer
First Repo
Learn more in The Turing Way chapter: https://the-turing-way.netlify.app/collaboration/github-novice.html
You created your first repo.
CONGRATS!!
Slide by Sophia Batchelor, https://zenodo.org/record/5070361, https://tenor.com/view/flower-power-rainbow-yeah-gif-7304860
Markdown (.md) for formatting
Markdown: what’s that?
Markdown is a simple text “markup” language made for quickly writing formatted text
Great for blogs, documentation, and even writing papers.
You may have used it in HackMD.
Markdown (.md) for formatting
Create a README file
GitHub Exercise!
GitHub Exercise: Create a README.md
Learn more in The Turing Way chapter: https://the-turing-way.netlify.app/collaboration/github-novice.html
GitHub Exercise: Create a README.md
Write whatever you would like!
GitHub Vocabulary
Commit
Saving a version of file(s)
Branch & Fork
open-life-science/repo-name
Branch & Fork
malvikasharan/repo-name
user name
Fork + Pull Request
If you don’t own a repo and aren’t an official collaborator:
Pull Request (PR)
Fork + Pull Request
If you don’t own a repo and aren’t an official collaborator:
Pull Request (PR) - 1
Task: Edit by adding your details “/week-05/week-05-notes.md”
Pull Request (PR) - 2
Task: Edit by adding your details “/week-05/week-05-notes.md”
Review: Demo ☀️
Users with write access can approve and merge PRs
Merge
Merge
Create an issue: Demo
Issues are like posts/messages
Issue vs Pull Request (PR)
Using Issue & PR Features
Breakout 1
Using Issue & PR Features
Congratulations!
You now know:
Commit
Issue
Pull request
Merge
There are many more Github features that you can try in your own time.
Photo from @martzzl on Unsplash
Creating a small website with GitHub
Sharing information on your own website
For an Open Research project:
The Answer is Yes!
Creating a small website
Working with GitHub Pages
Breakout 2: Creating your site
See examples
51
Glossary & Questions
Don’t worry if you haven’t gotten all the terms yet - Play around more & clarify any questions by email or Slack.
Follow on with the remaining materials in your time.
After this workshop
Project Board/Management Feature
Project or Project Board
Sort issues, notes, to-dos in a set of columns. These could be:
More on this next week!
More on “pull request”
Branch & PR
Pull request in your own repo
Pull request
request to add your changes from a branch back into master
Merge
act of incorporating new changes (commits) from one branch to another
Adding additional files to your repo
Add a license
GitHub can add a license for you
when adding a new file named LICENSE...
| non-copyleft | copyleft |
No patent clause | BSD, MIT | |
Patent snapback | APL- 2.0 | GPLv3, MPL-2.0 |
| non-copyleft | copyleft |
No attribution | CC0 | |
Attribution | CC BY | CC BY-SA |
Add additional files
As discussed in the previous cohort calls:
Adding your project members or mentors as collaborators to your repository
Add collaborators
Settings - add collaborators here
Click here
Add collaborator’s name here
Why and When would I add collaborators?
Git/GitHub Features
Fork
make a copy of someone else repository
Pull request
request to add your changes into a forked repository
Clone
copy a repository onto your local computer
Download Zip
download the content of a repository
Learn more in The Turing Way chapter: https://the-turing-way.netlify.app/collaboration/github-novice.html
The “README.md” is automatically rendered when you visit a repo
Create & manage “Issues”
Your default branch is “main” - but you can switch or add branches here
Download Zip to download the zipped repo onto your computer
Clone to your computer from the web using GitHub Desktop or git command
Fork this repo
Pull Request to add your changes into forked repo
Glossary & Questions
Don’t worry if you haven’t gotten all the terms yet - Play around more & clarify any questions by Slack.