Version Control Made Simple: Git & GitHub for New Coders
Updated: May 26, 2025
Versioning:
Programming and version control can feel confusing and intimidating, but this guide aims to make them easier to understand. It starts by explaining the concept of versioning, which is essentially tracking and saving snapshots of file changes over time. This allows developers to review or roll back changes as needed.
Git:
Git is a popular version control system (VCS) that helps manage this process manually—unlike cloud sync tools like Google Drive or Dropbox that update automatically. With Git, developers intentionally decide when to save (or commit) changes and share them with others. So, It allows multiple developers to work on a project simultaneously.
Git was created by Linus Torvalds in 2005 for the development of the Linux kernel.
GitHub
A cloud platform built on Git, owned by Microsoft.
Hosts repositories (containers for your project files) and handles backups.
Offers tools like GitHuB Desktop.
Alternatives: GitLab, Bitbucket, or self-hosting (less common due to complexity).
Key features of GIT
Version Control System: Git keeps track of every change you make to your project files. You can go back to previous versions if any requirement arises.
Repositories: A Git repository (or repo) is like a project's central hub where everything related to your work is stored and managed. There are two main types:
Local Repository: This is a copy of the repository which is stored in your computer. You can work on your project and make changes here.
Remote Repository: This is stored on a server, like GitHub, where you and others can share and work on a project.
Commits: Every time you make changes and save them in Git, these are called commits. The repository keeps track of all the commits you have made.
Branches: A repository allows you to create Branches and work on new features and fixes. For example, you can have a "main" branch for stable code and a "feature" branch for new features you're developing.
Merging: Once you are done with the branches you have made, you can merge those branches into the main branch. This adds the changes you have made in the rest of the project.
Cloning: Cloning is a process of making a complete copy of a Git repository. It's like copying the entire project from a central location ( like a website) to your own computer.
Key Git Concepts
Term | Description |
Repository | A project folder tracked by Git (local & remote) |
Clone | Make a local copy of a remote repository |
Add | Stage changes before saving |
Commit | Save a version with a message |
Push | Upload your changes to GitHub |
Pull | Download latest changes from the cloud |
Branch | A separate version of your code to develop features without affecting main |
Merge | Combine branches or changes |
GitHub Desktop:
A beginner-friendly visual tool for managing Git operations without using the command line.
Download and install the GitHub Desktop from https://desktop.github.com/download/
Using GitHub Desktop to:
Clone a repository.
Make and commit changes.
Push updates to GitHub.
Fetch/pull changes from others.
Working with Repositories
Cloning a Repository:
Use GitHub Desktop to copy a remote project to your machine
Committing Changes:
Only the staged files (added) are saved in a commit
Each commit should have a clear, concise message (e.g., “Fixed login bug”)
Pushing and Pulling:
Push: Upload your commits to GitHub
Pull: Download changes made by others
Pushing and Pulling:
Push: Upload your commits to GitHub
Pull: Download changes made by others
Branching & Merge Conflicts
a. Branching:
Use branches to experiment or build new features without affecting the main code.
Main branch = stable code
Feature branch = new login feature
b. Merge Conflicts:
Occur when two developers change the same file in different ways. Resolve by:
Accepting one version
Merging both manually
Recommitting the resolved code
Steps to Setup Git and GitHub:
1. Install Git
Visit https://git-scm.com and download Git for your operating system (Windows, Mac, or Linux).Follow the installation instructions provided on the website.Optional GUI Git clients:
GitHub for Mac (these redirect to GitHub Desktop)
2. Sign Up for GitHub
Go to https://github.com
Click Sign up and create an account if you don’t already have one.
3. Create a New Repository
Log in to GitHub.
Click the + sign (top-right) → New repository.
Fill in:
Repository name
Description (optional)
Choose Public or Private (Private is recommended for beginners)
Optional selections:
Initialize with a README.md
Add .gitignore (select Python if uploading Python files)
Choose a license (e.g., GNU, MIT)
Click Create repository.
4. Upload Files to the Repository
Once the repo is created, click Add file → Upload files.
Select the file(s) from your computer (e.g., a .py Python file).
After uploading, scroll down and click Commit changes.


