Bonaventure OgetoBy Bonaventure Ogeto|

Git and GitHub for Complete Beginners in Rwanda

Git is a version control tool that tracks changes in your code. GitHub is a website that hosts your Git repositories online so others can see and collaborate on your code. To get started: install Git (free), create a GitHub account (free), learn five commands (git init, git add, git commit, git push, git pull), and push your first project. The entire setup takes 30 minutes. Once you understand these basics, you can collaborate on team projects, showcase your work to employers, and never lose code to a crashed laptop again.

Why Git Matters (Even for Solo Developers)

Imagine spending three hours building a feature that works perfectly. Then you make a small change, and everything breaks. You cannot remember exactly what you changed. You try undoing things manually, and it gets worse. This is the problem Git solves.

Git takes a snapshot of your code every time you tell it to (called a "commit"). Each snapshot has a message describing what changed. If something breaks, you can see exactly what changed and revert to any previous snapshot. It is like an unlimited undo button for your entire project.

But Git is not just a safety net. It is also the standard tool for team collaboration. When you work at a tech company in Kigali (or remotely for an international company), your team uses Git to coordinate. Multiple developers work on the same project simultaneously without overwriting each other's work. Understanding Git is not optional for professional development. It is expected.

And it is the backbone of your portfolio. GitHub (where your Git repositories live online) is the first place a Rwandan tech employer looks when evaluating a developer. Your GitHub profile shows what you have built, how often you code, and whether your code is organized. It is your developer resume.

Setup: Installing Git and Creating a GitHub Account

Step 1: Install Git

Git is free and works on Windows, Mac, and Linux.

  • Windows: Download from git-scm.com and run the installer. Accept the default settings.
  • Mac: Open Terminal and type git --version. If Git is not installed, macOS will prompt you to install it.
  • Linux (Ubuntu/Debian): Open Terminal and run sudo apt install git.

After installation, open your terminal (Command Prompt on Windows, Terminal on Mac/Linux) and run:

git --version

If you see a version number (like "git version 2.40.0"), Git is installed.

Step 2: Configure Git with your identity

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

Use the same email you will use for GitHub. Git attaches this identity to every commit you make.

Step 3: Create a GitHub account

Go to github.com and sign up for a free account. Choose a professional username. This will appear in your portfolio URLs (github.com/yourusername), so pick something clean. Your real name or a simple handle works. Avoid random numbers or joke names.

The Five Commands You Need to Know

Git has dozens of commands. You need five to start. The rest can wait until you encounter specific situations that require them.

1. git init

Run this once in a new project folder to tell Git to start tracking changes in that folder.

mkdir my-project
cd my-project
git init

This creates a hidden .git folder where Git stores its tracking data. You never need to touch this folder directly.

2. git add

Tells Git which files you want to include in your next snapshot (commit).

git add index.html          # add a specific file
git add .                    # add all changed files

Think of git add as placing files in a "ready to save" staging area.

3. git commit -m "message"

Takes the snapshot. The message describes what changed.

git commit -m "Add menu section to homepage"

Good commit messages are short and specific: "Fix broken MoMo callback URL," "Add contact form to about page," "Remove unused CSS styles." Bad messages: "Update," "Fix stuff," "Changes." Your future self (and your teammates) will thank you for clear messages.

4. git push

Uploads your commits from your local machine to GitHub.

git push origin main

After pushing, your code is visible on GitHub. Anyone with the URL can see it.

5. git pull

Downloads the latest changes from GitHub to your local machine. Essential when working on a team or when you work from multiple computers.

git pull origin main

This fetches any changes your teammates pushed and merges them with your local code.

Your First Push: From Local Project to GitHub

Let us walk through the entire process of taking a project on your laptop and putting it on GitHub.

1. Create a repository on GitHub

  • Go to github.com and click the "+" button, then "New repository."
  • Name it (e.g., "kigali-coffee-house").
  • Leave it public (so employers can see it).
  • Do not initialize with a README (we will create one locally).
  • Click "Create repository."

GitHub shows you instructions for pushing an existing project. Follow the "push an existing repository" commands:

2. In your terminal, navigate to your project folder and run:

git init
git add .
git commit -m "Initial commit: Kigali Coffee House landing page"
git branch -M main
git remote add origin https://github.com/yourusername/kigali-coffee-house.git
git push -u origin main

GitHub may ask for authentication. The recommended method is a personal access token or SSH key. The GitHub documentation walks through both options.

3. Refresh your GitHub repository page. Your files should appear. You now have a public code repository that anyone can view.

4. Going forward, the daily workflow is:

git add .
git commit -m "Describe what you changed"
git push

Three commands. That is your daily Git routine. Run them every time you finish a meaningful piece of work (a new feature, a bug fix, a style update).

Your GitHub Profile Is Your Developer Resume

In Rwanda's tech market, your GitHub profile matters more than most certifications. Here is how to make it work for you.

The contribution graph. The green squares on your GitHub profile show how often you commit code. A profile with regular green activity tells an employer you code consistently, even if the projects are small. Gaps are fine (everyone takes breaks), but long stretches of zero activity raise questions.

Pinned repositories. GitHub lets you pin up to six repositories to the top of your profile. Pin your best projects: deployed, well-documented, with clear READMEs. These are the first things a visitor sees.

README files. Every project should have a README.md that explains:

  • What the project does (one to two sentences).
  • A link to the live demo (if deployed).
  • Technologies used.
  • How to run it locally (for developers who want to explore the code).
  • A screenshot or two (people are visual; a screenshot tells more than a paragraph).

Profile README. GitHub supports a special repository (named the same as your username) whose README appears on your profile page. Use it to introduce yourself: "Full-stack developer based in Kigali. Building for the Rwandan market." Add links to your portfolio, deployed projects, and how to contact you.

Think of your GitHub as the front door to your developer career. Every commit, every project, every README is a signal to potential employers and collaborators. For more on what Rwandan employers look for, see our portfolio projects guide.

Beyond the Basics: What to Learn Next

The five commands above cover solo development. When you start working on a team (or contributing to open source), you will need a few more concepts.

Branches. A branch lets you work on a new feature without affecting the main code. Create a branch, build your feature, and merge it back when it is ready.

git checkout -b new-feature     # create and switch to a new branch
# ... make changes, add, commit ...
git checkout main                # switch back to main
git merge new-feature            # merge the feature into main

Pull requests. On GitHub, a pull request (PR) is a way to propose changes. Instead of merging directly, you create a PR and your teammates review the code before it goes into the main branch. This is how professional teams work, and understanding PRs is essential for team projects and open-source contributions.

Merge conflicts. When two people change the same file in different ways, Git cannot automatically merge the changes. It marks the conflict and asks you to resolve it manually. This sounds scary, but it is a normal part of team development. VS Code has built-in tools that make resolving conflicts visual and manageable.

.gitignore. A file that tells Git which files to ignore (not track). Use it to exclude node_modules, environment files (.env), build output, and any files that should not be pushed to GitHub (especially files containing passwords or API keys).

These concepts come naturally as you use Git on real projects. Do not try to memorize everything upfront. Learn the five basic commands, start using them today, and pick up branches and pull requests when a project or team requires them.

McTaba's Tech Foundations course (KES 2,999, approximately RWF 30,000) covers Git as part of the professional development toolkit, including the workflow patterns that teams actually use. For the full-stack development path including team collaboration tools, see the Full-Stack Software and AI Engineering course (KES 120,000, approximately RWF 1,200,000).

Key Takeaways

  • Git tracks every change you make to your code. If you break something, you can go back to any previous version. This safety net is why every professional developer uses it.
  • GitHub is not the same as Git. Git is the tool (runs on your computer). GitHub is the website that hosts your code online. You need both.
  • Five commands cover 90% of daily Git usage: git init, git add, git commit, git push, and git pull. Learn these first. Advanced features can wait.
  • Your GitHub profile is your developer resume. A green contribution graph and clean repositories tell employers more than a PDF listing your skills.
  • Start using Git from your first project. Do not wait until you "need" it. The habit of committing regularly and writing clear commit messages pays off from day one.

Frequently Asked Questions

Is Git the same as GitHub?
No. Git is the version control tool that runs on your computer and tracks changes in your code. GitHub is a website that hosts Git repositories online. You can use Git without GitHub (your repositories stay local), but using both together lets you back up your code online, share it publicly, and collaborate with others. GitLab and Bitbucket are alternatives to GitHub that work with the same Git commands.
Do I need to use the command line, or is there a visual tool?
You can use visual tools. VS Code has built-in Git support (the Source Control panel), and GitHub Desktop is a standalone visual Git client. These tools run the same Git commands behind the scenes. However, learning the command line commands is recommended because: (1) they work everywhere, (2) job interviews may test command line Git, and (3) understanding the commands helps you understand what the visual tools are doing.
What if I accidentally push sensitive information (passwords, API keys)?
If you push a secret to GitHub, consider it compromised even if you delete it immediately. GitHub history preserves previous commits. The immediate steps: rotate the exposed credential (generate a new API key, change the password), add the file containing secrets to .gitignore, and remove the sensitive data from Git history using tools like git-filter-repo or BFG Repo Cleaner. Prevention: always use .gitignore from the start and store secrets in environment variables, never in your code files.

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