Skip to main content

Command Palette

Search for a command to run...

Lesson 1 — Git & GitHub Journey

Updated
2 min read
Lesson 1 — Git & GitHub Journey
H
Network Engineer with 3+ years of experience in infrastructure, system administration, and enterprise networking, currently transitioning into DevOps and Cloud Engineering. Hands-on experience with Fortinet firewalls, routers, switches, Windows/Linux servers, and Hyper-V virtualization. Currently building and learning with Docker, Kubernetes, AWS, Linux, CI/CD, GitHub Actions, and automation tools while leveraging MERN stack knowledge to understand the complete application lifecycle from development to deployment. Passionate about cloud infrastructure, automation, containers, and modern DevOps practices. Regularly sharing my learning journey, projects, and hands-on experiments.

Lesson 1 — Git & GitHub Journey

What is Git?

Git is a version control system.

It tracks:

  • file changes

  • code history

  • who changed what

  • rollback versions

  • team collaboration

Think like:

Save Game System for Code

Every save point = commit.

Why Git Exists

Without Git:

project-final
project-final-v2
project-final-final
project-final-final-real

Chaos 😄 ------ Git solves this.

Install Check

Run:

git --version

Expected:

git version 2.x.x

Your First Git Project

Step 1 — Create Folder

mkdir git-course
cd git-course

Step 2 — Initialize Git

git init

Output:

Initialized empty Git repository

Now Git starts tracking this folder.

Git creates hidden folder:

.git

# Check 
ls -a

This is the Git database.

Step 3 — Check Status

git status

This is the MOST used Git command.

It shows:

  • modified files

  • staged files

  • untracked files

Step 4 — Create File

echo "Hello Git" > app.txt

Check status again:

git status

You’ll see:

Untracked files:
  app.txt

Meaning: Git sees file but not tracking yet.

Step 5 — Stage File

git add app.txt

Now check:

git status

You’ll see:

Changes to be committed

Important Concept

# Git has 3 stages:

Working Directory
      ↓
Staging Area
      ↓
Repository

Step 6 — Commit

Commit = save snapshot.

git commit -m "first commit"

If error about username/email:

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

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

## Then retry commit.

Step 7 — View History

git log

You’ll see:

  • commit id

  • author

  • date

  • message

Example:

commit a1b2c3...
Author: Hatim
Message: first commit

More from this blog

G

Git, GitHub & Workflows Guide – From Basics to Real DevOps Practices

3 posts

Welcome to my learning journey in Git, GitHub, and modern development workflows. This blog documents my hands-on experience, notes, practical examples, and lessons learned while exploring version control, collaboration, branching strategies, pull requests, automation, CI/CD, and DevOps practices. The goal is to build a structured knowledge base that helps both me and other developers learn through real-world examples and continuous practice.