iHub Resources

26 October, 2025

Getting Started with Git — Version Control Made Easy

Getting Started with Git — Version Control Made Easy

Introduction

Whether you’re working on a solo project or collaborating with a team, Git helps you track changes, manage versions, and collaborate efficiently. It’s the tool behind platforms like GitHub and GitLab — and it’s essential for every developer or innovator managing code and project files.

This guide walks you through installing Git, setting up your first repository, and pushing code to GitHub — even if you’ve never used Git before.


1. Installing Git

Windows

  1. Visit git-scm.com

  2. Download the Windows installer.

  3. Run it, and select:

    • “Use Git from the Windows Command Prompt.”

    • “Checkout Windows-style, commit Unix-style line endings.”

  4. Complete the setup and restart your terminal.

macOS / Linux

Use your terminal:

sudo apt install git

or

brew install git

Verify installation:

git --version

2. Configuring Git

Set your name and email — this information appears in every commit:

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

3. Creating Your First Repository

Navigate to your project folder:

cd my-project

Initialize Git:

git init

This creates a hidden .git folder that tracks all changes.

Add files and make your first commit:

git add .
git commit -m "Initial commit"

4. Connecting to GitHub

  1. Create a new repository on GitHub.

  2. Copy the HTTPS link.

  3. Connect it to your local repo:

git remote add origin https://github.com/username/my-project.git
git branch -M main
git push -u origin main

Your code is now safely backed up and version-controlled!


Summary

You’ve just taken your first step into version control. Whether you’re developing an app, writing research code, or collaborating on an innovation project at the Hub, Git ensures your progress is tracked and your teamwork is seamless.