Bonaventure OgetoBy Bonaventure Ogeto|

Git and GitHub for Beginners in Nigeria: The Essential Guide

Git is a version control system that tracks changes in your code. GitHub is a platform where you store your code online and collaborate with others. Together, they are non-negotiable skills for any developer job in Nigeria. Every company in Lagos, from Paystack to the smallest startup in Yaba, uses Git. Learning Git takes about one week for the basics and a few more weeks to become comfortable with branching and merging. Start using Git from your very first project. The earlier you build the habit, the stronger your GitHub profile will be when you start applying for jobs.

What Git and GitHub Are (Plain Language)

Imagine you are writing a document. You make changes, save, make more changes, save again. But sometimes you want to go back to an earlier version. Without Git, you would need to save copies manually: "document_v1.docx", "document_v2_final.docx", "document_v2_final_FINAL.docx." Everyone has done this. It is chaotic.

Git eliminates that chaos for code. It tracks every change you make, who made it, and when. You can go back to any previous version at any time. You can experiment with new features without risking the working version. When you make a mistake, you roll back. This is called version control.

Git is the tool that runs on your computer and tracks your changes.

GitHub is a website (github.com) where you store your Git repositories online. Think of it as Google Drive for code, but with collaboration features built in. Your code is backed up in the cloud, visible to anyone you choose, and accessible from any computer.

They are related but separate. Git works without GitHub (you can track changes locally). But GitHub adds backup, collaboration, and visibility. Every Nigerian developer uses both.

Why Every Nigerian Developer Job Requires Git

Open any developer job listing on Jobberman or LinkedIn Nigeria. Under "Requirements," Git and GitHub appear almost universally. This is not a nice-to-have. It is the baseline.

Why companies insist on Git:

  • Collaboration. When 5 developers at a Lagos startup are working on the same codebase, Git keeps their changes organized. Without it, they would overwrite each other's work constantly.
  • History and accountability. Git records who changed what and when. If a bug appears after a deployment, the team can trace exactly which change caused it.
  • Code review. Before code goes live, another developer reviews it. GitHub's Pull Request system makes this structured and documented.
  • Safety net. If a new feature breaks the app, the team can revert to the previous working version in seconds. Without Git, this recovery could take hours.

Why GitHub matters for your career:

  • Your GitHub profile is your public portfolio. Recruiters at Paystack, Flutterwave, Andela, and other Nigerian companies check GitHub profiles.
  • The contribution graph (green squares showing your activity) signals consistency. A profile with months of regular commits tells an employer you code regularly, not just during tutorial binges.
  • Open source contributions on GitHub demonstrate collaboration skills and are valued by HNG Internship, She Code Africa, and international remote employers.

Setting Up Git and GitHub (Step by Step)

Step 1: Install Git

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

Step 2: Configure your identity

Open your terminal and run:

git config --global user.name "Your Name"

git config --global user.email "youremail@example.com"

Use the same email you will use for GitHub.

Step 3: Create a GitHub account

Go to github.com and sign up. It is free. Choose a professional username (your real name or a clean handle, not "codingKing2024" or similar). This is a professional platform that employers will see.

Step 4: Connect Git to GitHub

You need to authenticate so your local Git can push code to GitHub. The recommended method is SSH keys. GitHub's documentation walks you through generating an SSH key and adding it to your account. It takes 5 minutes and you only do it once per computer.

The Git Commands You Need (Nothing More)

You do not need to memorize 50 Git commands. You need these:

Starting a project:

  • git init - Initialize Git tracking in your project folder
  • git clone [url] - Download an existing repository from GitHub to your computer

Daily workflow:

  • git status - See what files have changed
  • git add . - Stage all changed files for committing
  • git commit -m "describe what you changed" - Save the staged changes with a message
  • git push - Upload your commits to GitHub
  • git pull - Download the latest changes from GitHub

Branching (when you are comfortable with the basics):

  • git branch feature-name - Create a new branch
  • git checkout feature-name - Switch to that branch
  • git merge feature-name - Merge the branch back into main

The daily habit: Every time you finish a meaningful chunk of work (added a feature, fixed a bug, completed a section), commit and push. Your commit messages should describe what you did: "add product listing page," "fix cart total calculation," "integrate Paystack checkout." Not "update" or "fix stuff."

A Real Workflow: Building a Nigerian Project With Git

Let us walk through how you would use Git on a real project, say an e-commerce store with Paystack integration.

Day 1: Create the project folder, run git init, create your first files (index.html, app.js), commit with "initial project setup", create a GitHub repository, push.

Day 2: Build the product listing page. Commit: "add product listing page with NGN prices." Push.

Day 3: Add the shopping cart. Commit: "add cart functionality with add and remove." Push.

Day 5: Integrate Paystack. You are not sure this will work, so create a branch: git branch paystack-integration, switch to it, and work there. If it breaks everything, your main branch is still safe. When it works, merge it back.

Day 7: Deploy to Vercel. Commit: "configure for Vercel deployment." Push. Vercel auto-deploys from GitHub.

Each commit is a save point. If Paystack integration breaks the cart on Day 5, you can go back to Day 3's version and try again. This safety net makes you braver with your code. You experiment more because mistakes are reversible.

Start Using Git Today

If you have any coding project on your computer, even a half-finished one, initialize Git and push it to GitHub right now. Open your terminal, navigate to the project folder, and run:

git init
git add .
git commit -m "initial commit"

Then create a repository on GitHub and push. Your first commit does not need to be perfect code. It needs to exist. From this point forward, commit and push every time you make progress. In three months, your GitHub profile will have a visible track record that employers respect.

If you are just starting your coding journey, our build your first website guide gives you a project to practice Git with. And if you want structured learning from foundations through full-stack development, create a free McTaba Academy account to explore the curriculum.

Key Takeaways

  • Git tracks every change you make to your code. If you break something, you can go back to a working version. This is why professional developers never code without it.
  • GitHub is where your code lives online. It is also your public portfolio. Nigerian recruiters check GitHub profiles before interviews.
  • The essential Git commands fit on one page: git init, git add, git commit, git push, git pull, git branch, git merge. You can learn them in a day and practice them daily.
  • Start using Git from your first project, even if your code is messy. A GitHub profile with months of consistent commits signals discipline to Nigerian employers.
  • HNG Internship, She Code Africa, and most Nigerian tech programs require Git/GitHub knowledge. Learning it early removes a barrier to every opportunity.

Frequently Asked Questions

Is Git hard to learn?
The basics (init, add, commit, push, pull) can be learned in a day. Branching and merging take a few more practice sessions. Advanced Git (rebasing, cherry-picking, resolving complex merge conflicts) takes weeks to months but you do not need these as a beginner. Start with the basic commands and add to your knowledge as you encounter real situations.
Do I need to pay for GitHub?
No. GitHub offers free accounts with unlimited public and private repositories. The free tier is more than enough for individual developers and small teams. Paid plans add features for large organizations, which you will not need as a beginner or even for several years.
Should I use Git from the terminal or a GUI app?
Start with the terminal. It is the standard way Nigerian employers expect developers to use Git. Terminal commands also work on any computer without installing extra software. Once you are comfortable, VS Code has built-in Git integration that provides a visual interface for common operations.
What if I push bad code to GitHub?
Everyone pushes bad code sometimes. You can fix it with a new commit. Git tracks the history, so yes, someone could see your mistake if they look at old commits, but no one is going through your commit history with a magnifying glass. What matters is that your current code works and your commit history shows steady improvement.

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