What is Git, How to use it and Why version control matters.
If you're new to tech or programming like me, then you've probably come across phrases like:
Did you commit your changes?
Push it to GitHub.
Pull the latest version.
And honestly, it feels like you were left out of an inside joke.
This article explains Git, GitHub, and Version control in layman's terms: why they matter, what they do, and how to use them as a complete beginner.
What is Version Control?
Version Control is a system that tracks your changes over time.
It allows you to:
See what changed, when, and why
Go back to a previous version safely
Work with others without overwriting each other's work
Experiment without fear of breaking everything
This is where Git comes in.
What is Git ?
Git is a version control tool that helps you save, track and manage changes to your project over time.
Instead of creating multiple messy files, Git:
Records every meaningful change
Saves it with a message explaining what you did
Lets you rewind to any point in time: time travel within your project
Scales from solo projects to global teams
How to push code to GitHub as a beginner
Pushing means sending your local project to GitHub
GitHub is an online platform that stores Git projects. It makes sharing and collaboration easier
Step 1: Create a new repository on GitHub
- Go to GitHub.com
Create a new repository
Copy the repository URL
Step 2: Connect to your local project
- Inside your Project folder on GitHub
git init
This code tells Git to start tracking this project.
Step 3: Add everything in the folder
git add.
Step 4: Commit your Changes
git commit -m "Added data cleaning script."
Step 5: Copy the Repository URL from GitHub
https://github.com/yourusername/repository-name.git
Step 6: Run
git branch -M main
git remote add origin https://github.com/yourusername/repository-name.git
Step 7: Push your code
git push -u origin main
Et Voila, your code is now on GitHub
From here on out, the next time you make changes, all you need is the code below:
git add.
git commit -m "Describe what you changed."
git push
How to Pull code from Git
Now we will tackle how to pull code; where pulling is Getting the latest version of a project
If you don't have the project or this is your first time: use clone
Copy the repository link from GitHub. It often looks like this:
https://github.com/username/repo-name.git
Run the code
git clone https://github.com/username/repo-name.git
By doing this, you:
-Download the project
-Set up Git automatically
-Connects to GitHub
If you already have the project on your computer, then use Pull:
Go into the project folder on Bash
cd repo-name
Pull the latest changes
git pull
By doing this, you pull the latest updates from GitHub and merge them into your local files.
Cloning applies when getting the project for the first time
Pulling applies when updating an existing project
How to track projects using Git.
Each time you work on your project, you will repeat this cycle:
Check what changed
git status
This tells you:
-Which files were modified
-Which files are new
-What is not yet tracked
This, simply put, is your dashboard.
Stage the changes:
To stage everything, use this code
git add.
To stage a specific file, use this code.
git add filename.py
This tells git what you want to save.
Commit the changes:
git commit -m "Describe what you changed."
This is like saving a checkpoint in a game
View project history:
git log
This shows:
- All past commits
- Who made them
- When they were made
Breaking the giant into smaller, bite-sized pieces made it less scary and way simpler to digest and follow through. At its core, Git aims to protect your work, track your progress, and facilitate collaboration without chaos.
Whether you are learning software development, data science, analytics or working on research projects, Version Control isn't optional; it's a superpower.

Top comments (0)