T19-L01 · Share & review code · Level 1 User · 15-minute read, plus 45 minutes of doing
Almost what you need
Your group's qPCR protocol lives in a shared folder as protocol_final_v3_MB.docx. Last month someone lowered the annealing temperature, nobody remembers why, and the version from before is gone. In a company it's the onboarding checklist or the price rules: five copies, no dates, no reasons.
In this book you put one file into a repository on Gitea, a website that keeps every saved version with who changed what, when and why. You change it twice, read the history, and take one change back, all in the browser, one step and one screenshot at a time. You are at Level 1 User: it's your own repository, so only you are affected if something goes wrong.
After this you can
- Create a private repository on Gitea and add a file to it in the browser.
- Change the file, see the change in red and green before you save it, and save it with a message that says why.
- Read a file's history and open any earlier version.
- Take one change back with Revert without losing the changes that came after it.
Before you start
- Books: T01-L01 · From Idea to Working Result: The Four-Quadrant Method for the four-quadrant method.
- A Gitea account. Ask IT whether your organisation runs Gitea and for its address. If not, create a free account on gitea.com and use it only for made-up or public files.
- A web browser. Nothing to install.
- About 60 minutes: 15 to read, 45 to do.
Last verified 25 September 2026. Gitea is free, open-source software that many institutes and companies run themselves. gitea.com offers free accounts with a limited number of repositories. Details for experts at the end of this book.
The idea in one page
- A repository is a folder that remembers. Every time you save, Gitea keeps the new version and all the old ones.
- A save is called a commit. Each commit records who, when, which lines changed, and a message you write. The message is the only place the why is kept, so write it for a colleague who reads it in a year.
- Red and green show what changed. Removed lines are red, added lines green. You see this before you save and forever after.
- Plain-text files show every line. Markdown (
.md, plain text with#for headings), CSV and scripts do. Word and Excel files are kept too, but Gitea can only say that they changed, not what. - Revert takes one change back by adding a new commit that undoes it. Nothing is deleted, so even the revert can be reverted.
Watch it once (2 minutes)
No sound. A yellow dot points at each button while the caption explains it. Read the tour as text (opens in a new tab).
Set up (steps 1 and 2, once)
Step 1: Sign in to Gitea. Open your organisation's Gitea address, or gitea.com, and click Sign In at the top right. On gitea.com without an account, click Register first.

You should see: your dashboard, with Issues, Pull Requests and Explore at the top and + at the top right.
Step 2: Create a private repository. Click + at the top right, then New Repository.

Fill in:
- Repository Name:
qpcr-protocol(Company:onboarding) - Visibility: tick Make repository private
- Description: one line, for example Our qPCR protocol and plate layout, with every change kept
- Further down, below this picture: tick Initialize Repository (Adds .gitignore, License and README)
Click Create Repository.

You should see: your repository with a grey Private label, a file README.md and 1 Commit above the file list.

Worked example: a protocol that remembers every change
Structure it
Step 3: Say what you want in one sentence. Mia writes:
When I change our qPCR protocol, I want each change saved with who, when and why, so I can get last month's version back, instead of files called final_v3.
Understand it
Step 4: Sort your files. Mia's shared folder has three files. She puts them in a table before she uploads anything:
| File | Plain text? | What Gitea will show |
|---|---|---|
| The protocol | She copies its text into a new file in step 5 | Every changed line |
| The plate layout | Already a .csv | Every changed line |
| Last run's results | .xlsx | Only that it changed |
She starts with the protocol, because that's where the unexplained change happened.
Choose tools
- Gitea in the browser: nothing to install, and her institute runs it.
- Private: the protocol isn't published yet.
Build it: add the file
Step 5: Add the protocol as a new file. On the repository page, click Add File, then New File. Name it protocol.md and paste:
# qPCR protocol: GAPDH and target gene X
Owner: Mia, Example Lab. A made-up example for the course.
## Reaction mix (per well, 20 µl)
- 10 µl 2x SYBR Green master mix
- 0.8 µl forward primer (10 µM)
- 0.8 µl reverse primer (10 µM)
- 3.4 µl water
- 5 µl cDNA (1:10 dilution)
## Cycling
1. 95 °C for 2 min
2. 40 cycles: 95 °C for 15 s, then 60 °C for 30 s
3. Melt curve from 65 to 95 °C
## Checks
- A no-template control in every run
- Triplicates; repeat a sample if its Cq values spread by more than 0.3
Under Commit Changes, replace the grey suggestion with a message that says what and why: Add the qPCR protocol as we run it in September. Leave Commit directly to the main branch selected and click Commit Changes.

You should see: the protocol with real headings and bullet points. Gitea turns Markdown (the # and - signs) into formatting.
Step 6: Upload a file you already have. Click Add File, then Upload File, and drag a small .csv or .txt file onto the box, or click the box to choose one. No file at hand? Download Mia's plate-layout.csv (opens in a new tab) first. Message: Add the plate layout for 96-well runs. Click Commit Changes.

You should see: your file in the list next to protocol.md.
Build it: change and check
Step 7: Change one value and preview it before you save. Click protocol.md, then the pencil icon at the top right of the file. Change 60 °C in the cycling step to 58 °C. Click Preview Changes above the text.

You should see: one red line with 60 and one green line with 58. If more lines are red and green than you meant, click Edit File and fix them before you save.
Message: Lower annealing to 58 °C: primer set B gave no product at 60 °C. Click Commit Changes.
Step 8: Make a second change. Edit again and change the spread in the last line from 0.3 to 0.5. Message: Allow a Cq spread of up to 0.5. Commit. (You'll take this one back in step 12.)
Step 9: Read the history. Open protocol.md and click History in the grey bar above the text.

You should see: three commits for this file, newest at the top, each with who, a short ID (column SHA1) such as 4e7d505f01, the message and when. The counter above says 5 Commits because it counts the whole repository, including the README and the plate layout. This list is what the shared folder never had.
Step 10: Open one change. Click the message Allow a Cq spread of up to 0.5.

You should see: 1 changed files with 1 additions and 1 deletions (Gitea's wording), the old line in red and the new one in green.
Step 11: Look at an old version. Go back to the history. At the right of the first commit, Add the qPCR protocol…, click the last of the three small icons (hover to see its name), View at this point in history.

You should see: the file exactly as it was then, with 60 °C and 0.3. Nothing has changed; you're only looking. To copy text from it, click Raw.
Step 12: Take a change back with Revert. Open the commit Allow a Cq spread of up to 0.5 again (step 10). Click Operations at the top right, then Revert.

In the small window, keep main and click Revert.

On the next page, replace the one-line title at the top (it starts with revert) with the reason: Revert: keep the Cq spread at 0.3, 0.5 lets bad triplicates through. Click Commit Changes.

You should see: the protocol says 0.3 again, and 58 °C from step 7 is still there. The history now has four commits; the newest is your revert.

Step 13: Find who changed a line. Open protocol.md and click Blame in the grey bar.

You should see: next to every line, the commit that last changed it. Click one to open that change.
Company: the onboarding checklist
Tom keeps the checklist for new colleagues as onboarding.md in a private repository onboarding.
- Step 7: IT moves the laptop order from two to three weeks ahead. Tom changes that one line: Laptop order 3 weeks ahead: new supplier.
- Step 13: a manager asks why the buddy line disappeared in March. Blame on the lines around it leads to the commit that removed it.
- Step 12: Tom brings the line back with Revert on that commit.
What goes wrong
The history shows "Binary file not shown." Symptom: you changed a Word or Excel file and the commit shows no lines. Fix: that's all Gitea can show for those formats. Keep what changes often as .md or .csv, and write in the message what you changed.
"The Commit ID does not match the ID when you began editing." Symptom: you click Commit Changes and get this message. Fix: someone, or you in another tab, saved the file after you opened it. Copy your text, reload the file, edit again and commit.
Messages that say nothing. Symptom: the history reads Update protocol.md five times. Fix: write the reason in the message box before you commit. A year from now it's the only record of why.
Private data in the history. Symptom: you uploaded a file with patient, personnel or customer data, then deleted it. Fix: deleting doesn't help, because the old version stays in the history. On your organisation's Gitea, tell the administrator; on gitea.com, delete the whole repository under Settings. Use only made-up or approved data.
The repository is public. Symptom: there's no Private label next to its name. Fix: Settings, tick Make repository private, click Update Settings.
Revert fails. Symptom: a red bar says Unable to apply patch. Fix: a later commit changed the same lines. Open the old version (step 11), copy the lines you need and edit the file by hand, with a message that says what you restored.
Do it yourself (45 minutes)
- Structure it (5 min): write your sentence: "When I change ___, I want ___ instead of ___."
- Understand it (5 min): list the files involved and whether each is plain text, as in step 4. Pick one text file.
- Choose tools (5 min): your organisation's Gitea, or gitea.com with made-up content only. Private repository.
- Build it (30 min): steps 2 and 5 with your text file, step 6 with a second file. Then two real changes with Preview Changes (steps 7 and 8), the history (9 and 10), an old version (11), one Revert (12) and Blame (13).
Exit check
A private repository on Gitea whose main file has at least four commits in its History, including one revert. It passes when every message says why, and you can show a colleague, within one minute, the red-and-green view of one change and the file as it was before it.
Rule to remember
Every change gets a message that says why, and the way back is Revert, never a file called final_v2.
Details for experts
Checked on 25 September 2026. You don't need this to follow the book; it's for setting things up or answering a colleague.
| What | Details | What it means for you |
|---|---|---|
| Version | Gitea 1.27.2, with its default light theme. Many organisations run it on their own servers. Forgejo, which Codeberg runs, started as a copy of Gitea and looks similar. | Buttons on your organisation's Gitea may be a few versions older and look slightly different. |
| gitea.com | The Gitea project's own free service, with a limited number of repositories per account. | Fine for practice with made-up files; not for unpublished or personal data. |
| Commit ID | A 40-character code, shown shortened to 10, such as 583604e3fa. It's unique for each commit. | Quote it when you tell a colleague which change you mean. |
| main | The default branch: the main line of versions. Other branches are for trying things out without touching it. | At Level 1 you always commit directly to main. Branches come at Level 3 of this track. |
| Revert or delete | Revert adds a commit that undoes an earlier one; the history stays complete. Git can also rewrite history, which Gitea's web pages deliberately don't offer. | You can't lose work with the steps in this book. |
| Web editor | A plain-text editor with Preview (formatted) and Preview Changes (red and green). Upload takes several files at once. | Large or many files are easier from your own computer: T19-L02 · Work on a Shared Gitea Repository From Your Computer With OpenCode. |
| GitHub | The same steps exist on GitHub: Add file, the pencil, History, Blame. GitHub has no Revert button for a single commit; it offers one only for merged pull requests. | If your group uses GitHub, everything here applies except step 12. |
Further reading and tools
- T08-L01 · Start With OpenCode: Set It Up, Change One Line, and Undo It: the same idea of saved versions, used by an AI coding assistant on your own computer.
- T19-L02 · Work on a Shared Gitea Repository From Your Computer With OpenCode: copy the repository to your computer and share it with a colleague.
- Gitea: Taught. Repositories, the web editor, history, Blame and Revert.
- GitHub: Catalogued. The best-known hosted alternative.
- Git: Catalogued. The version-keeping program underneath Gitea.