Version Control Practices for Research Code Before Submission
Research code is increasingly part of the evidence behind a published study. Statistical scripts generate regression results, computational programs process datasets, simulation algorithms produce experimental outcomes, and analytical pipelines transform raw information into tables and figures. Yet researchers often treat code management as a technical task rather than as part of research quality.
This becomes particularly important immediately before manuscript submission. By this stage, code may have undergone dozens of changes: variables have been renamed, models revised, datasets updated, errors corrected, and figures regenerated. Without a reliable record of these changes, it can become difficult to establish which exact version produced the results reported in the manuscript.
Used properly, it allows researchers to track changes, identify the version associated with the final analysis, recover earlier versions, collaborate safely, and preserve a transparent computational history. Current guidance from major scholarly publishers increasingly emphasizes clean, documented, versioned research code as part of transparent and reproducible research.
For authors preparing a manuscript for Crosslink Studies (CLS), this practice fits directly within the publisher’s emphasis on reproducibility, research transparency, and responsible sharing of code and supporting materials. CLS recommends depositing data and code in trusted repositories where feasible and expects materials necessary to reproduce research to be appropriately identified.

The Problem with “Final _Final _ Updated” Code
Many research projects accumulate files with names such as:
Analysis final. R
analysis final2.R
analysis final revised. R
analysis final revised new R
Although this may seem harmless during a busy research project, it creates uncertainty about which file represents the authoritative analysis. The problem is not simply poor organization. If a reviewer asks why a coefficient in Table 3 differs from an earlier version, the researcher needs to reconstruct the analytical history accurately. If a published result must later be verified, the author should be able to identify the precise code that generated it.
Version control replaces informal file naming with a structured history of changes.
What Should Researchers Track?
Version control is most effective when applied to the complete computational workflow rather than only the main analysis script.
Analysis Scripts
Track the scripts responsible for data cleaning, variable transformation, statistical analysis, model estimation, robustness testing and visualization
Configuration and Environment Files
Code may depend on particular software packages, libraries, or computational settings. Environment files can record these requirements and help future users recreate the analytical environment. This complements dependency documentation and long-term archiving. IEEE’s reproducibility guidance specifically considers documentation, dependencies, installation requirements, and the ability to execute research artefacts when assessing reproducibility.
Documentation
A repository should also contain a clear README explaining the project.At minimum, it should identify:
What the code does → What software is required → How the workflow runs → What data are needed → What outputs are generated
Commit Changes with Meaningful Messages
One of the simplest improvements researchers can make is to write meaningful version-control commit messages. A message such as: “changes” provides almost no useful information.
A message such as: “Corrected missing-value treatment before regression analysis” creates a much more informative research history.
Similarly:
- “Added robustness specification”
- “Updated variable transformation”
- “Regenerated Figure 2”
- “Corrected model specification”
- “Prepared submission release”
Separate Exploration from the Submission Version
Research is rarely linear. Authors test alternative specifications, explore different variables, investigate unexpected results, and sometimes abandon entire analytical approaches. That experimentation is normal. Before submission, researchers should identify a stable version containing the code that corresponds to the manuscript. This version should be clearly marked for example, as a release associated with the submitted manuscript.
A useful structure is:
Development → Testing → Verification → Submission Release
Use Branches Carefully
For larger collaborative projects, version-control branches can allow researchers to experiment without destabilizing the main analytical workflow. For example:
main — verified research version
analysis-update — new model specification
robustness-test — alternative estimation strategy
Check the Code Before Submission
Version control does not automatically make code reproducible. A repository can have an excellent history and still contain broken scripts, missing dependencies, incorrect paths, or undocumented assumptions. Before submitting a manuscript, researchers should perform a reproducibility check.
A pre-submission test should therefore ask:
Can the code run from a clean environment?
Are all dependencies documented?
Are file paths portable?
Are required datasets identified?
Can the main tables and figures be regenerated?
Does the output correspond to the manuscript?
If the answer is no, the code is not yet ready for archival release.
Protect Sensitive Information
Version-control repositories can preserve much more than researchers intend. Before making a repository public, authors should carefully inspect its contents for:
- Passwords
- API keys
- Access tokens
- Personal information
- Confidential datasets
- Proprietary files
- Institutional credentials
- Temporary files containing sensitive information
A particularly important principle is that deleting a sensitive file from the current version does not necessarily remove it from the repository’s historical record.
Link the Code Version to the Manuscript
A strong research workflow creates an explicit relationship between the article and the computational version behind it. The manuscript should identify where the code is available, while the repository should identify which release corresponds to the article.
The relationship can be represented as:
Manuscript → Code Repository → Version/Release → Dependencies → Data → Results
This is considerably stronger than providing a generic link to a repository that may continue changing after publication.
Licensing and Attribution Matter
Making code publicly accessible does not automatically explain what other researchers are legally permitted to do with it. Authors should select an appropriate software license and ensure that third-party code is not redistributed in violation of its own license. Licensing also clarifies whether future researchers may modify, reuse, distribute, or build upon the code.
This is particularly important for research intended to have a long life beyond the original publication. A clear license reduces uncertainty and can encourage responsible reuse.
For CLS authors, this should be considered alongside the publisher’s copyright, licensing, data-sharing, and research-material policies. CLS emphasizes transparent scholarly communication while requiring authors to retain appropriate rights and permissions for materials they submit or share.
A Practical Pre-Submission Version-Control Checklist
Before submitting a computational manuscript, researchers can use a simple final checklist:
1. Clean
Remove unnecessary, temporary, and sensitive files.
2. Organize
Use clear folders, descriptive filenames, and logical scripts.
3. Document
Add a README explaining installation, execution, dependencies, data, and outputs.
4. Review
Check that the code produces the results reported in the manuscript.
5. Test
Ask another researcher to run the workflow where feasible.
6. Freeze
Create a clearly identified version corresponding to the submitted research.
7. Archive
Deposit the stable version in an appropriate trusted repository.
8. Link
Connect the archived version to the manuscript through the relevant code or data availability information.
Version Control as Part of Research Integrity
Version control should not be viewed merely as a convenience for programmers. It is a research-management practice that helps preserve the relationship between analytical decisions and published conclusions.
When properly implemented, it can answer questions that are otherwise surprisingly difficult to resolve: Which code produced this result? When was it changed? What changed? Which version was submitted? Can the analysis be reconstructed? CLS places strong emphasis on rigorous peer review, research quality, reproducibility, and transparent scholarly communication. Its editorial process includes technical and editorial checks before peer review, while its publishing guidance emphasizes complete experimental details and appropriate access to supporting research materials.
For that reason, version control should be integrated into the research workflow before the manuscript reaches the submission stage—not added as an afterthought once a reviewer requests the code.
Build the Record Before You Publish
A published paper is a snapshot of research at a particular point in time. Version-controlled code helps preserve the computational history behind that snapshot.
The strongest practice is therefore simple:
Develop transparently. Track systematically. Test independently. Freeze the publication version. Archive it responsibly.
When these steps become routine, researchers gain more than cleaner code. They create a durable computational record that supports verification, collaboration, reproducibility, and future discovery. For Crosslink Studies, this approach complements the broader commitment to open-access scholarship, accessibility, research quality, and the long-term value of published research.
