Skip to content

Modesta55/git-diff-mastery-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Git Diff Mastery Project

A Real-World DevOps Workflow Demonstration
Day 10 β€” Cloud & DevOps Rebranding Journey

This project is a complete, hands-on demonstration of Git change-tracking skills using real DevOps files and a practical workflow inside VS Code + WSL Ubuntu.
It simulates how DevOps engineers review, compare, validate, and track changes across configuration files, scripts, and infrastructure code.

The repository is intentionally structured like a real DevOps working environment.


πŸ“Œ Project Goals

By completing this project, you demonstrate your ability to:

  • Track changes in infrastructure and config files using Git
  • Compare versions and review code like a DevOps engineer
  • Use git diff commands effectively in daily workflows
  • Work with VS Code + WSL on Windows
  • Use Git to manage YAML, JSON, Bash scripts, and Terraform files
  • Produce clear documentation for a DevOps portfolio

πŸ—οΈ Repository Structure

git-diff-mastery-project/
β”‚
β”œβ”€β”€ deploy_config.yml
β”œβ”€β”€ app_config.json
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ deploy.sh
β”‚   └── cleanup.sh
β”œβ”€β”€ infrastructure/
β”‚   β”œβ”€β”€ terraform.tfvars
β”‚   └── main.tf
└── docs/
    └── README.md

###############################################################################################################
πŸ› οΈ Tools Used

Windows 10/11

VS Code

WSL Ubuntu

Git

Terraform syntax

YAML / JSON

Linux Bash scripting

###################################################################################################################
πŸš€ Step-by-Step Workflow (End-to-End)

STEP 1 β€” Open the Project in WSL + VS Code

Open WSL terminal.

Navigate to your DevOps folder:

cd ~/My-DevOps-Folder
mkdir git-diff-mastery-project
cd git-diff-mastery-project
code .


VS Code will open inside WSL (Linux environment).

STEP 2 β€” Create the Full Folder Structure

Inside the root folder, create:

scripts/
infrastructure/
docs/

STEP 3 β€” Create All the Files

Create these files manually in VS Code:

deploy_config.yml
app_config.json
scripts/deploy.sh
scripts/cleanup.sh
infrastructure/main.tf
infrastructure/terraform.tfvars
docs/README.md


Paste the correct content from your project setup into each file.

STEP 4 β€” Initialize Git

In the VS Code terminal (WSL):

git init
git add .
git commit -m "feat: initial project setup"


Your baseline version is now created.

STEP 5 β€” Make Realistic Modifications

Simulate real-world DevOps workflow changes:

deploy_config.yml: change number of instances and add timeout.

scripts/deploy.sh: add a new validation echo.

infrastructure/terraform.tfvars: change environment from staging to production.

These changes allow testing every type of diff output.

STEP 6 β€” Practice Git Diff Commands

Check unstaged changes:

git diff


Check staged changes:

git add deploy_config.yml scripts/deploy.sh
git diff --staged


Ignore whitespace changes:

git diff -w


Compare two commits:

git log --oneline
git diff <hash1> <hash2>


Compare unrelated files outside Git:

git diff --no-index deploy_config.yml app_config.json


Word-level diff:

git diff --word-diff


Summary/stat of changes:

git diff --stat

STEP 7 β€” Final Commit

Once all experiments are completed:

git add .
git commit -m "feat: completed git diff mastery project"

🧩 Real DevOps Use Cases Demonstrated

Reviewing IaC (Terraform) before deployment

Checking YAML/JSON changes in production configs

Validating script modifications during CI/CD

Ensuring deployments use correct environment variables

Avoiding whitespace errors that break YAML

Performing code reviews without an external tool

πŸ‘©β€πŸ’» Author

Nwachukwu Uchechi Modesta
Cloud Security & DevOps Engineer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published