Introduction
In a previous post, we were able to successfully set up a Windows virtual machine using VirtualBox. This left us ready to begin working on data science projects.
But, data science, like most tech fields, boils down to code and files. And thus, we must consider a number of questions around these, including:
- How do we store them?
- How do we track changes made?
- How can we access them across different machines?
- How can we share them with collaborators?
This is where version control comes to save the day.
Version Control / Source Control
Version Control is defined as "the practice of tracking and managing changes to software code". 1 Essentially, it is a mechanism of keeping track of changes made to computer files, particularly source code files, with the ability to view old versions and optionally revert a file to a preferred previous version.
It has been around in some form for as along as humans have worked with computers, with early attempts having collaborators managing sharing of computer files and projects, through means such as pendrives, emails and shared folders. Most approaches were clunky, with no built-in way of detecting who made what changes to what files and folders when. This resulted in teams coming up with strange conventions e.g. folders being named project, project1, project-latest etc. Also, errors such as accidental overwrites were quite common with users commonly having the work lost when others working on the same files and folders posted their work to the common storage area after them.
Ultimately, all these problems led to the rise of Version Control Systems (VCS). These are software tools used mostly in, but not limited to, software development and collaborative projects to automatically track and manage changes to source code files.
Benefits of such systems include:
- Automated functionality to record and track every update to code base.
- Collaborate with others without fear of accidentally permanent overwrites.
- Easy reversion to previous versions of specific files and folders (or the project as a whole).
- Ingrained, structured history which simplifies auditing of the project's progression.
There exist a number of popular VCS tools used by individuals, teams and enterprises, including Mercurial, Subversion, Fossil and CVS. The most popular one, however, and both the focus of this article and tool in use at LuxDevHQ, is Git.
Git
Git is a lightning-fast, free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. 2
It was originally developed by Linus Torvalds - the creator of Linux - as version control for the development of the Linux Kernel. It has since grown to become used by over 93% of developers worldwide. It is compatible with and installable on most conventional operating systems as well as on technologies such as Docker.
Installation
To install on one's machine, head on over to the Install for guidance on the specific OS.
For Windows Users
Visit here and download the latest version of Git for Windows which includes a command line interface (CLI) within which one can run Git commands (known as Git Bash).
Upon completion of the download, double click on the file to trigger installation. Click Yes when prompted for User Account Control (UAC) permission. This will open the Git Setup Wizard.
Most of the default configurations should suffice so you can consistently click "Next" throughout the process. (Should you encounter a configuration that you wish to change, kindly feel free to change it.) Once done, the installation will run for a few seconds. Upon completion, check the Launch Git Bash option, uncheck View Release Notes then click Finish. It should open a window similar to the one below.
Setup
With Git installed, we can now jump into setting up.
First off, there needs to be a global user configured to use Git (this can be overridden within individual repositories). To do this, run the following commands:
User's name
git config --global user.name "<Your Name>"
- **User's email address"
git config --global user.email "<your.email@emaildomain>"
NB: Replace <Your Name> and <your.email@emaildomain> with actual name and email address, respectively.
Once done, run git config --list to confirm the configurations have applied correctly.
Repository Setup
Now, let's cross over to creating and configuring a Git repository. A repository is a central location in which data is stored and managed. Within the context of a software project, it can be thought of as the root folder containing the source file and code.
First, we shall a create our project folder
Create a folder within the CLI
mkdir -p test-project
NB:
-pinstructs the CLI to create any intermediate parent folder that may be missing.
Navigate into the new folder
cd test-projectCreate a sample README
touch README.md
Populate the README with some informative message
echo "This is a test project showing how to set up a Git repository" >> README.md
NB: You can confirm that the content has been written into the README file using the following command
cat README.md
Being a data science project, let's create a test a sample Python that simply prints greetings to the CLI
touch test.py && echo "print('Hello, World')" >> test.py
NB: You can combine multiple commands using the
&&operator
Let's now list the content of the current folder (i.e test-project) to confirm that all our files are in place
ls .
If you see both of our newly created files (i.e README.md and test.py), then you are good to continue.
NB:
.in the commandls .represents our current working folder.
NB: You can find a cheat sheet of common Linux commands that can run in the CLI here.
Now, let's configure our folder into a git repository
- Initialize Git in the folder
git init
- Stage the created files in preparation for committing
git add .
Commit the new files with an optional message
git commit -m "Initial Commit"
The repository is now ready to be delivered to an online Git repository service.
Atlassian. (2026, Jan 16). What is version control: Atlassian Git Tutorial https://www.atlassian.com/git/tutorials/what-is-version-control ↩
Git. (2026, Jan 18). Git https://git-scm.com ↩



SOCIAL SHARE CARD GENERATOR