Skip to content
ProtocolProtocol
← Your pathLevel 1 · Beginner

Version control without becoming a software engineer

Lesson 3 of 6 · From chat to script

1 · Learn the move · Recipe pattern

You need six git commands, used the same way each time - a recipe, not a discipline change. The payoff: the exact code that made figure 3 is recoverable forever, because you tagged it. The recipe: init once per project; a .gitignore that keeps data OUT of the repository - data is large, sometimes sensitive, and never belongs in git; add and commit at natural moments, with messages that say what changed scientifically ("switched to Welch after variance check failed"), not "updates"; and tag the commit a figure or submission came from. Data is referenced by path and checksum in a manifest, so the repo records which data without containing it. Branches, rebasing, the collaborative apparatus - not needed for a one-scientist analysis repo. Six commands, and in March you answer "which version made this figure?" in one line.

Set up version control for my analysis folder as a recipe I follow, not a system I study: (1) the init commands for [folder]; (2) a .gitignore that excludes my data files ([extensions/dirs]) and keeps scripts, notebooks, and the environment file; (3) a data manifest pattern - path + SHA256 + date - so the repo references data without containing it; (4) the three-command commit ritual with message rules (scientific change, not "updates"); (5) the tag command for "this made figure N". Explain nothing beyond what the recipe needs; if my situation raises something the recipe cannot cover ([shared drive, huge files]), say so rather than improvising.

2 · Your turn. You write the prompt

Your RNA-seq analysis folder holds scripts_v2_final_FIXED.py and three cousins, plus 40 GB of BAMs you must never accidentally commit. A collaborator asked which script version produced the volcano plot in the submitted figure. You could not answer. Install the recipe.

Remember: the AI sees only your prompt, not this page. If the situation isn't in your prompt, it doesn't exist.

Optional. These shape the output when you run your prompt below, not your score.