Skip to main content

Command Palette

Search for a command to run...

Git (Part 1)

Updated
2 min read

Today is Day 22 of my DevOps/AWS learning journey, and I started exploring Git, one of the most important tools for developers and DevOps engineers. Git is a distributed version control system that allows tracking file changes, maintaining project history, and enabling team collaboration.

For me, this marks the foundation of proper version control practices, which will be critical in both solo projects and team-based DevOps workflows.


What I Learned

Installation

  • Amazon Linuxsudo yum install git -y

  • Ubuntusudo apt install git -y

  • Windows → Installed from git-scm.com

  • Verified using → git --version

Configuration (one-time setup)

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

This ensures every commit is tagged with the right author details.

Git Areas (Conceptual Stages)

  1. Working Directory – Where files are created/modified.

  2. Staging Area – Snapshot of changes marked for commit.

  3. Local Repository – Commits stored locally.

  4. Remote Repository (e.g., GitHub) – Central place for collaboration.

Workflow I Practiced

Working Directory → git add → Staging Area → git commit → Local Repo → git push → Remote Repo

Commands Explored

  • git init → Initialize a repository.

  • git status → See file status.

  • git add . / git add <file> → Stage changes.

  • git commit -m "message" → Commit to local repo.

  • git log, git log --oneline, git show → Explore commit history.

  • git diff → Compare changes.

  • git blame <file> → See line-by-line history.

  • git commit --amend → Update the last commit message.


What I Built / Practiced

  • Installed Git on a VM and configured user details.

  • Initialized a test repository, created files, and tracked changes.

  • Practiced staging and committing using git add and git commit.

  • Explored different ways to view commit history and diffs.

  • Updated a commit message using git commit --amend.

This hands-on approach gave me clarity on how Git records and manages changes at every stage.


Key Takeaway

Today I realized Git is more than just a tool—it’s a safety net for developers. By breaking down changes into stages (working → staging → commit), Git ensures control, traceability, and collaboration. Even a single file change has a complete history, making debugging and teamwork more reliable.


Next Steps

  • Learn Git branching and merging.

  • Practice handling merge conflicts.

  • Explore rebase and interactive history rewriting.

  • Push local repositories to GitHub and work with remotes.

Documenting DevOps Learning Journey

Part 23 of 40

In this series, I document my day-by-day DevOps learning journey by building projects using AWS, Docker, Kubernetes, Terraform, and CI/CD, and sharing lessons, challenges, and practical insights along the way.

Up next

Git (Part 2)

In my previous session, I focused on the fundamentals of Git such as creating repositories, staging files, committing changes, and understanding the basic workflow.Today, I explored some advanced but very practical Git concepts: recovering deleted fi...

More from this blog

Documenting My DevOps Journey

40 posts