Activity 1: Make a repo
Modern DevOps for Systems Biologists
A. Make a repository
Go to github.com/new. Give it a name like
my-first-repo. Keep it Private.Tick Add a README file.
In the Add .gitignore dropdown, choose the template for whatever language you actually work in — Python, R, Julia, MATLAB. Then click Create repository.
(Optional) Open the
.gitignoreit made for you and inspect it.Click
README.md, click the pencil icon, delete what is there, and paste this in its place:# Rotation project ## Results so far Nothing yet. ## Conditions | Condition | Temperature | | control | 25 C | | heat shock | 42 C | ## Overview Measuring how fast the reporter turns over under heat stress.Commit it.
B. Editing and committing
Perform each of the following edits, with each one being a separate commit, with a semantic commit message. Use the Preview tab in the editor as you go, so you can see what your Markdown actually renders as.
Add a column to the table that records a rate \(k\).
But the conditions table in
README.mddoes not render properly. It comes out as one long line with pipes in it, instead of a table. Fix it.A Markdown table needs a row of dashes under its header, separating the header from the body. Without it, the whole thing is just a paragraph that happens to contain
|characters.Add a Data section to
README.md, saying where the large files for this project live — a Dropbox folder, a Google Drive, a server — and why they are not in this repository.Put the sections in a more standard order: Put Overview at the top.
C. Read your own history
Go to your repository’s front page and click on the commit count — the little clock icon with a number next to it.
Six months from now you want the commit where you recorded \(k\). Can you find it from the messages alone, without opening a single commit?
D. Optional: the hash that cannot cite itself
Every commit has a hash — the string like e4f19a2 beside it in the list. It is a fingerprint of everything in the project at that moment. It is how the three places in the lecture — data, code, manuscript — each record which version of the others they go with.
Copy the hash of your most recent commit. Add a line to
README.mdreading This version:e4f19a2, with your own hash, and commit it.Your README now cites the version before it. A figure caption in a manuscript does exactly this, which is what lets you regenerate that figure years later.
Are you able to make the
README.mdstate the current commit hash? Hint: do not try for too long.