Git and GitHub for Beginners in Uganda: The 5 Commands You Need
Git is version control software that tracks every change you make to your code. GitHub is a website that hosts your Git repositories online so others can see your work. To get started, install Git on your machine, learn five commands (git init, git add, git commit, git push, and git pull), and push your first project to GitHub. Those five commands handle 90 percent of what you will do with Git as a beginner. GitHub also functions as a developer resume: Ugandan employers and remote clients check your GitHub profile to see your code, your consistency, and what technologies you work with.
Installing Git on Your Machine
Git runs on Windows, Mac, and Linux. The installation takes a few minutes and only needs to happen once.
Windows: Download the installer from git-scm.com. Run it and accept the default settings. When the installer asks about your default editor, choose VS Code if you have it installed. After installation, open a terminal (Command Prompt or PowerShell) and type git --version. If you see a version number, Git is installed.
Mac: Open Terminal and type git --version. If Git is not installed, macOS will prompt you to install the command line developer tools, which include Git. Click "Install" and wait a few minutes.
Linux (Ubuntu/Debian): Open a terminal and run sudo apt update && sudo apt install git. If you are running Ubuntu on a secondhand laptop (common in Uganda), this is the command you need.
After installation, configure your identity:
git config --global user.name "Your Name"
git config --global user.email "yourname@email.com"
Use the same email address you will use for your GitHub account. Git attaches this information to every commit you make, so it links your work to your identity.
If your internet is limited: Download the Git installer at a cyber cafe, an Outbox Hub session, or anywhere with free wifi. Copy it to a USB drive and install at home. Git itself works entirely offline once installed. You only need internet when pushing to or pulling from GitHub.
The 5 Git Commands You Will Use Every Day
Git has dozens of commands. Beginners need five. These five handle the workflow you will repeat hundreds of times as a developer.
1. git init
Run this once inside a project folder to start tracking it with Git. Navigate to your project folder in the terminal and type git init. This creates a hidden .git folder that stores all version history. You only run this once per project.
cd my-first-website
git init
2. git add
Stages your changes, telling Git "I want to include these files in my next snapshot." Use git add . to stage everything that changed, or git add filename.html to stage a specific file.
git add .
# or
git add index.html style.css
3. git commit -m "message"
Saves a snapshot of your staged changes with a description. This is like saving a version of your work with a label explaining what you did. Write clear messages. "Add contact form" is good. "Update stuff" is bad.
git commit -m "Add contact form with validation"
4. git push
Uploads your commits to GitHub (or another remote host). After your first push, your code is backed up online and visible to anyone who visits your repository. If your laptop breaks tomorrow, your code is safe on GitHub.
git push origin main
5. git pull
Downloads changes from GitHub to your local machine. This matters when you work on multiple computers or collaborate with other developers. Before you start coding, pull the latest version.
git pull origin main
The daily cycle: Write code. git add. git commit. git push. Repeat. That is the workflow professional developers follow every day, whether they work at a startup in Kampala or a remote company in San Francisco.
Your First Push to GitHub
Let us walk through pushing an actual project to GitHub, step by step.
Step 1: Create a GitHub account. Go to github.com and sign up. Use a professional-looking username. "john-doe-dev" is fine. "xXcoolhacker99Xx" is not. This username will appear on your developer resume.
Step 2: Create a new repository. Click the "+" icon in the top right corner and select "New repository." Name it something descriptive, like ugx-currency-converter or my-first-website. Check "Public" so anyone can see it. Do not initialize with a README (you will create your own).
Step 3: Connect your local project to GitHub. GitHub shows you commands after creating the repository. Run them in your project folder:
git remote add origin https://github.com/yourusername/my-first-website.git
git branch -M main
git push -u origin main
The first push might ask for your GitHub credentials. GitHub now requires a personal access token instead of a password. Go to GitHub Settings, then Developer Settings, then Personal Access Tokens, then Tokens (classic), and generate one. Use this token as your password when prompted. Save it somewhere secure.
Step 4: Verify. Go to your repository URL on GitHub. Your files should be there. Congratulations: your code is now on the internet.
Step 5: Add a README. Create a file called README.md in your project folder. Write a brief description of your project: what it does, what technologies you used, and how to run it. This is the first thing people see when they visit your repository.
# My First Website
A personal portfolio website built with HTML, CSS, and JavaScript.
Includes a UGX to USD currency converter.
## Technologies
- HTML5
- CSS3
- JavaScript (vanilla)
## Live Demo
[View live site](https://yourusername.github.io/my-first-website)
Stage, commit, and push:
git add README.md
git commit -m "Add project README"
git push origin main
GitHub as Your Developer Resume
In Uganda, your GitHub profile matters as much as your CV for technical roles. When a hiring manager at a Kampala startup or a remote client on Upwork considers you, they look at your GitHub to answer three questions: Does this person actually write code? How consistent are they? What technologies do they know?
What employers see:
- Contribution graph: The green squares on your GitHub profile showing when you committed code. A profile with consistent green squares over several months signals dedication. A profile with two weeks of activity six months ago signals a passing interest.
- Pinned repositories: You can pin up to six repositories to the top of your profile. Pin your best, most relevant projects. For the Ugandan market, a MoMo integration project, a school fees system, or an e-commerce checkout with mobile money are strong choices.
- Code quality: Hiring managers will click into your code. Clean variable names, consistent formatting, meaningful comments, and organized file structures all matter. Messy code in public repositories works against you.
- Commit messages: "Add MoMo payment callback handler" tells a reviewer what you did. "Fix bug" and "asdfg" tell them you do not care about communication.
Build the habit now: Commit code to GitHub every day you write code. Even if it is just a small change. Even if the project is unfinished. The consistency builds your profile and creates a public record of your learning journey. Six months of daily commits is more impressive to employers than a single polished project pushed all at once.
Profile optimization: Add a profile picture (professional, not a meme). Write a bio: "Software developer in Kampala. Building with JavaScript, React, and Node.js." Include your location. Link to your portfolio site or LinkedIn. These details make you look like a real, findable professional.
For more on building a complete developer profile, see our CV guide for Ugandan developers and our portfolio projects guide.
What to Learn After the Basics
Once you are comfortable with the five core commands, three additional concepts will make you more effective.
Branching: A branch lets you work on a feature without affecting the main codebase. Create a branch with git checkout -b feature-name, make changes, commit them, and merge back into main when the feature is complete. Every professional team uses branches. Learning them now prepares you for collaborative work.
git checkout -b add-contact-page
# make changes, add, commit
git checkout main
git merge add-contact-page
.gitignore: Some files should not be tracked by Git: API keys, environment variables, node_modules folders, and build outputs. Create a file called .gitignore in your project root and list the files and folders Git should ignore.
node_modules/
.env
dist/
This is especially important in Uganda where you might be working with MoMo API keys or Airtel Money credentials. Never push these to a public GitHub repository. Store them in environment variables and add .env to your .gitignore.
Pull requests: When working on a team, you do not merge directly into main. You create a pull request (PR) on GitHub that lets teammates review your code before it is merged. This is how every professional development team operates. Practice by creating PRs on your own repositories to get familiar with the workflow.
These three concepts, combined with the five core commands, give you everything you need for professional Git usage. You will pick up more advanced features (rebasing, cherry-picking, stashing) as your career progresses, but you can work effectively on any team with just this knowledge.
If you want structured guidance on the full developer workflow from Git through deployment, the Full-Stack + AI course (~UGX 3,400,000) covers version control as part of a complete development curriculum. For getting your projects live on the internet after pushing to GitHub, the Deployment course (~UGX 140,000) walks through the entire process.
Key Takeaways
- ✓Five commands handle 90 percent of your daily Git usage: git init (start tracking), git add (stage changes), git commit (save a snapshot), git push (upload to GitHub), and git pull (download updates). Master these before anything else.
- ✓GitHub is your public developer portfolio. Ugandan employers and international clients check GitHub profiles before interviews. A consistent commit history tells them you write code regularly, not just during courses.
- ✓Install Git once and it works offline. You can make commits on a bus in Kampala with no internet. Push them to GitHub when you next have a connection. This matters in Uganda where connectivity is not always reliable.
- ✓Start using Git from your very first project, even if it is a simple HTML page. Building the habit early means you never lose work and every project you complete is automatically documented.
Frequently Asked Questions
- Do I need internet to use Git?
- No. Git works entirely offline for everything except push and pull. You can initialize repositories, stage files, and make commits on a matatu between Kampala and Entebbe with no data connection. The internet is only needed when you want to upload (push) your commits to GitHub or download (pull) changes from it. This makes Git practical even when your connection is unreliable.
- Is GitHub free?
- Yes. GitHub is free for unlimited public repositories and unlimited private repositories for individual users. You can host every project you ever build on GitHub at no cost. Paid plans exist for teams and organizations with advanced features, but individual developers, including professionals, use the free tier for years without needing to upgrade.
- Can I use Git if I only code on my phone?
- It is technically possible using apps like Termux (Android), but the experience is poor. Git is designed for keyboard-based terminal use. If you are coding on a phone in Uganda, Git will be the most frustrating part of your workflow. Save up for a secondhand laptop if you can. Even a basic machine running Linux handles Git perfectly.
Ready to build real-world apps?
Join the McTaba Labs full-stack marathon (4 months full-time · 6 months part-time). Learn M-Pesa, USSD, and WhatsApp engineering while shipping 8 production apps.
Apply to the McTaba Marathon