What is Git/Codeberg?
Last updated on 2026-10-21 | Edit this page
Estimated time: 10 minutes
Overview
Questions
- What is Git?
- What is Codeberg?
Objectives
- explain the relevance and benefits of version control
- explain Git as an example of distributed versioning software and how it differs from a hosting platform like Codeberg
What is Version Control?
Version control is a name used for software which can help you record changes you make to the files in a directory on your computer. Version control software and tools (such as Git and Subversion/SVN) are often associated with software development, and increasingly, they are being used to collaborate in research and academic environments. Version control systems work best with plain text files such as documents or computer code, but modern version control systems can be used to track changes in most types of file.
At its most basic level, version control software helps us register and track sets of changes made to files on our computer. We can then reason about and share those changes with others. As we build up sets of changes over time, we begin to see some benefits.
Benefits of using version control?
- Collaboration - Version control allows us to define formalized ways we can work together and share writing and code. For example merging together sets of changes from different parties enables co-creation of documents and software across distributed teams.
- Versioning - Having a robust and rigorous log of changes to a file, without renaming files (v1, v2, final_copy)
- Rolling Back - Version control allows us to quickly undo a set of changes. This can be useful when new writing or new additions to code introduce problems.
- Understanding - Version control can help you understand how the code or writing came to be, who wrote or contributed particular parts, and who you might ask to help understand it better.
- Backup - While not meant to be a backup solution, using version control systems mean that your code and writing can be stored on multiple other computers.
There are many more reasons to use version control, and we’ll explore some of them for research data management, but first let’s learn a bit about a popular version control tool called Git.
What are Git and Codeberg?
We often hear the terms Git and Codeberg (or GitHub, GitLab, …) used interchangeably but they are different things.
Git is one of the most widely used version control systems in the world. It is a free, open source tool that can be downloaded to your local machine and used for logging all changes made to a group of designated computer files (referred to as a “git repository” or “repo” for short) over time. It can be used to control file versions locally by you alone on your computer, but is perhaps most powerful when employed to coordinate simultaneous work on a group of files shared among distributed groups of people.
Rather than emailing documents with tracked changes and some comments and renaming different versions of files (example.txt, exampleV2.txt, exampleV3.txt) to differentiate them, we can use Git to save (or in Git parlance, “commit”) all that information with the document itself. This makes it easy to get an overview of all changes made to a file over time by looking at a log of all the changes that have been made. And all earlier versions of each file still remain in their original form: they are not overwritten, should we ever wish to “roll back” to them.
Git was originally developed to help software developers work collaboratively on software projects, but it can be and is used for managing revisions to any file type on a computer system, including text documents and spreadsheets. Once installed, interaction with Git is done through the Command Prompt in Windows, or the Terminal on Mac/Linux. Since Word documents contain special formatting, Git unfortunately cannot version control those, nor can it version control PDFs, though both file types can be stored in Git repositories.
Distributed version control
Git is a distributed version control system: every copy of a repository – on your laptop, on a colleague’s computer or on Codeberg – contains the complete history of the project. You can work and commit offline and synchronise with the other copies later. No copy is technically special; it is only by agreement that a team treats one of them, for example the repository on Codeberg, as the shared, central one.
How can Git help with research data management?
- It documents how your data, scripts and documentation changed over time, and who changed what and why
- It lets you go back to earlier versions without keeping multiple
copies of files (
data_final_v2_corrected.csv) - It makes your work reproducible: you can refer to the exact version of a script or document that produced a result
Codeberg on the other hand is a website for hosting and sharing Git repositories remotely. It offers a web interface for browsing files and their history, and adds features for working together, such as issues, pull requests, wikis and websites. Codeberg is run by Codeberg e.V., a non-profit association based in Berlin, Germany. It is funded by donations, built on the free software Forgejo and dedicated to hosting free and open content: open source software, but also documentation, teaching materials like this lesson, and research projects.
There are many other Git hosting services that offer similar features, such as GitHub, GitLab (often run by universities and research institutions as their own instance) and Bitbucket. Because they all build on Git, almost everything you learn in this lesson applies to them as well: only the buttons in the web interface look a little different.
Why Codeberg?
We use Codeberg in this lesson because it is a non-profit, community-run platform hosted in the EU, it is built entirely on free software, and it does not track its users or use their content for commercial purposes. For research and teaching materials that are meant to be shared openly, this makes it a good fit.
Codeberg is intended for free and open content. Please check the Terms of Use before you use it for your own projects.
How can Codeberg help with research data management?
- A place to share code, documentation and small datasets, and to collaborate on them with colleagues inside and outside your institution
- A place to discover and reuse (“fork”) openly licensed projects, for example analysis scripts or metadata schemas
- Issues and pull requests document discussions and decisions together with the project
- A simple way to publish a project website with Codeberg Pages
Uses in Research Data Management
Consider these common scenarios:
Scenario 1: A research group cleaning a shared dataset
A doctoral researcher has exported survey data as a CSV file for cleaning. Several people in the group work on the data and the scripts that process it, so they need to make sure that edits don’t get lost or overwrite each other. They also need to be able to undo changes, keep the raw data unchanged, and explain later in a publication how the data was processed.
The group can use Git to record every change to the cleaning scripts and the documentation, together with a message explaining why it was made. By hosting the project on Codeberg, they can review each other’s changes before they are merged, and discuss problems they find in the data in issues. Months later, the history still shows who changed what, when and why.
Scenario 2: Reusing another group’s workflow
A data steward wants to help a research group set up a data processing workflow. She finds a project on Codeberg in which another institute has published scripts, a README and a metadata template for exactly this type of data under an open licence.
Instead of starting from scratch, she can fork the project, adapt it to the new group’s needs, and keep track of all changes. If she fixes a bug along the way, she can suggest the fix to the original project with a pull request, so that everybody benefits.
Scenario 3: Documenting and publishing a data project
A project team wants to describe their dataset, its variables and the conditions for reuse on a small website, and keep this documentation up to date while the project continues.
They keep the documentation as text files in a Git repository and publish them with Codeberg Pages. Every change to the documentation is versioned, so readers can see what changed, and the team can link to the exact version that belonged to a data publication.
- Version control helps track changes to files and projects
- Git and Git hosting platforms like Codeberg are not the same