+234703 549 0311

  |  

info@ictmasterclass.com

Introduction to Git and GitHub for Beginners

Web Development/by Iniobong Ekot/Wed Aug 06 2025
1

Introduction to Git and GitHub for Beginners

Introduction to Git and GitHub for Beginners

Imagine you’re writing a book. After a few weeks, you realize you’ve made some mistakes in Chapter 1. Without backups, fixing it means scrolling through old drafts or starting over. Frustrating, right?

This is the problem Git solves for developers: it tracks every change you make to your project so you can go back in time, collaborate with others, and never lose your work. Pair it with GitHub, and you can store projects online, share them, and even showcase your skills to employers.

In this post, we’ll break Git and GitHub into simple steps so you can start using them today.

Step 1: What is Git (and Why Should You Care)?

Git is a version control system. Think of it as a time machine for your code:

  • It tracks every edit you make.

  • You can roll back to a previous version anytime.

  • You can work with others without overwriting each other’s work.

Step 2: What is GitHub?

If Git is your time machine, GitHub is the cloud where you park it. It’s an online platform where you can:

  • Store your projects safely.

  • Collaborate with other developers.

  • Show your work to clients or employers.

You can use Git without GitHub, but most developers use both together.

Step 3: Install Git

  1. Go to git-scm.com.

  2. Download the version for your operating system.

  3. Follow the installation prompts (default settings work fine).

  4. Open your terminal (Command Prompt, PowerShell, or Mac Terminal).
    Run:

    git --version

    If it shows a version number, you’re good to go.

Step 4: Create Your First Git Project

  1. Create a new folder, e.g., my-first-git-project.

  2. Open it in your terminal and type:

    git init

    This creates a Git repository—your project is now being tracked.

  3. Add a test file, e.g., index.html.

Step 5: Save Your First Snapshot (Commit)

A commit is like taking a picture of your project at a moment in time.

git add . git commit -m "My first commit"


'git add .' - Tells Git to track changes.



'git commit -m "Message"' - Saves the snapshot with a short message describing what you did.


Step 6: Push to GitHub

  1. Create a free GitHub account at github.com.

  2. Click New Repository and give it a name.

  3. Copy the repository URL.

  4. Link your local project to GitHub:

    git remote add origin <repo-URL> git branch -M main git push -u origin main
  5. Refresh GitHub, and you’ll see your project online!

Step 7: Make a Change and Update GitHub

  1. Edit your index.html file.

  2. Run:

    git add . git commit -m "Updated index.html" git push
  3. Check GitHub; the changes are now live.

Why Learn Git and GitHub Early?

  • You never lose work again.

  • Collaboration becomes smooth and organized.

  • Employers expect it; it’s part of being a professional developer.

Takeaway:
Git is your safety net. GitHub is your portfolio. Start using them today, even for small projects, and you’ll thank yourself later.

Found this article useful? Share!

You may also like
Challenge 001 - 30 day Web Dev Bootcamp
Web Development
CSS 101: px, pt, em, rem Explained in Detail
Web Development
How the Internet Works (Explained Simply)
Web Development
Comments

No comment yet

Leave a Comment

Facebook

Popular Posts
The Definitive Guide To Marketing Your Business On Instagram

Trending Videos