Description
Tracking every change to analysis code, instruments and documentation as dated, attributed commits so any reported result can be traced to the exact code that produced it.
Version control records the full history of a project as commits, each with an author, timestamp and message. For research this provides an audit trail: which version of the cleaning script produced the figure in last quarter's deck, when an exclusion rule changed, and who changed it. Branches allow alternative analyses to be explored without destroying the main line, and tags mark the exact state used for a report. Rigour comes from small, well-described commits, tagging every delivered result, keeping data and secrets out of the repository, and reviewing changes before they reach reported outputs. It also makes analytic flexibility visible, which is a defence against undisclosed forking paths.
Attributes
- Discipline
- Research Design & Rigor
- Loss type
- Unmigrated
- Stage
- Evaluation
- Data
- Analytical / expert
- Effort
- Hours
Steps
- Initialise a repository at project creation with a .gitignore that excludes data, credentials and large media.
- Commit small, coherent changes with messages that state what changed and why (e.g. 'Exclude speeders under 1/3 median duration').
- Commit pre-registered hypotheses and analysis plans before data collection so the timestamp is verifiable.
- Explore alternative analyses on branches and merge only the analysis you will report, noting rejected alternatives.
- Tag the commit used for every delivered report (e.g. v2026-q1-report) and cite the tag in the report appendix.
- Use pull requests or peer review for changes to shared cleaning or scoring code.
Sources
- Python (pandas, numpy, pathlib)
- Jupyter Lab
- Git
- conda/venv
- cookiecutter project templates
- Ram, K. (2013) Git can facilitate greater reproducibility and increased transparency in science. Source Code for Biology and Medicine
- Wilson, G. et al. (2017) Good enough practices in scientific computing. PLOS Computational Biology
- The Inquiry Series, C1 — The Python Research Environment — Setup, Philosophy & Reproducibility
Also known as
- Git
- Source control for analyses
Categories
- Research Operations
- Research Design & Rigor