Scientific Meaning of a Diff
A diff does not show “text editing”.
It shows:
- Changed incubation times
- Added reagents
- Modified concentrations
- Removed safety instructions
In other words: It shows scientific modifications.
When a protocol changes, how do I see exactly what was modified?
Git does not only store versions of your SOPs.
It allows you to compare them line by line.
This comparison is called a diff.
For laboratory governance, git diff is one of the most important tools — it makes methodological evolution transparent.
When a protocol improves, small textual edits may represent major scientific changes.
For example:
Original SOP step:
Incubate at 55°C for 10 minutes.Improved SOP step:
Incubate at 55°C for 20 minutes.Add Proteinase K (0.2 mg/mL).Without structured comparison, such changes may go unnoticed.
With Git, you can inspect them precisely.
If you edited a file but have not yet committed it:
git diffGit will show the exact lines that were changed.
Example output:
Incubate at 55°C for 10 minutes.Incubate at 55°C for 20 minutes.Add Proteinase K (0.2 mg/mL).Lines beginning with:
- were removed+ were addedThis makes parameter changes immediately visible.
Scientific Meaning of a Diff
A diff does not show “text editing”.
It shows:
In other words: It shows scientific modifications.
To compare your current version with the previous commit:
git diff HEAD~1To compare two tagged releases:
git diff v1.0.0 v2.0.0This allows you to track how a protocol evolved across major revisions.
On platforms like GitHub or GitLab, pull requests automatically display diffs.
Reviewers do not read the entire SOP again. They inspect only the changes.
This improves:
Suppose someone accidentally changes:
Add 50 µL ethanol.to:
Add 500 µL ethanol.The diff would show:
Add 50 µL ethanol.Add 500 µL ethanol.This makes critical parameter changes obvious before approval.
Best Practice
Always review the diff before:
Diff review is quality control.
Using git diff transforms SOP management:
Instead of:
You gain:
A protocol becomes a versioned, inspectable scientific artefact.
git diff enables you to:
For laboratories managing SOPs in Git, diff is not optional.
It is the foundation of responsible procedural governance.