π DevSecOps Journey β Day 12

From Linux & Shell Scripting to Git and Corporate Branching Strategies
β¨ Understanding why Git exists and how teams collaborate at scale
Today marked an important transition in my DevSecOps journey. After completing Linux and Shell Scripting fundamentals, I moved into Git and corporate branching strategies.
Although I was already familiar with Git commands as a software engineer, revisiting Git with a DevOps mindset helped me understand why version control was created and how it solves real collaboration problems.
β Why Git Was Needed
Before Git and modern version control systems, teams faced multiple challenges:
β No version history
β Multiple developers editing the same file
β No central coordination
β No accountability for changes
β Single point of failure
β No isolation for features or fixes
These problems made collaboration slow, risky, and error-prone.
β How Git Solves These Problems
Git addresses these challenges by providing:
π Open-source version control
π§Ύ Complete change tracking
π₯ Distributed collaboration (multiple contributors)
π Rollback to previous versions
π Reliable code management
Git makes collaboration safe, auditable, and scalable.
π¦ What is a Git Repository?
A Git repository is the place where:
Source code lives
Version history is stored
Changes are tracked over time
Popular Git Hosting Platforms:
π GitHub
π¦ GitLab
π§° Bitbucket
These platforms also support pull requests, CI/CD, access control, and team collaboration.
πΏ Understanding Git Branches
Branches allow developers to create independent copies of the source code.
Why branches are important:
π Feature development
π Bug fixes
π§ͺ Experiments
π₯ Parallel development
Work on a branch does not affect the main code until merged.
π Git Workflow (High-Level View)
Working Directory β Staging β Commit β Push
touch test.java β git add . β git commit -m "message" β git push
What happens internally:
𧬠Git creates blobs using SHA-1 hashes (40 characters)
πΈ Each commit represents a snapshot of the project state
π· Tracked vs Staged Files (Refresher)
Understanding file states is crucial:
Untracked β Git is not aware of the file
Tracked β Git knows about the file
Staged β Ready to be committed
Example:
touch 2.txt # untracked & unstaged
git add . # tracked & staged
# modify file again
# tracked & unstaged
π Comparing Changes with git diff
Learned how to compare changes using:
git diff branch1 branch2
You can also compare using commit hashes instead of branch names.
This is useful for:
Code reviews
Debugging changes
Release analysis
π Merge vs Rebase
Understanding the difference is critical in corporate workflows:
πΉ Merge
Combines branches
Creates a merge commit
Preserves full history
πΉ Rebase
Rewrites commit history
No merge commit
Produces a cleaner, linear history
Choosing between merge and rebase depends on team standards and repository policies.
π― Why This Matters in DevOps & DevSecOps
Git is more than a version control tool. It enables:
π CI/CD pipelines
π‘ Secure code changes
π₯ Team collaboration
π Auditability
π Reliable releases
Understanding Git deeply is essential for building scalable DevOps workflows.
β Day 12 Summary
Today, I learned and refreshed:
Why Git was created
How Git solves collaboration problems
Git repositories and platforms
Branching fundamentals
Git workflow and internal concepts
Tracked vs staged files
git diff, merge, and rebase
This knowledge forms the backbone of modern software delivery and DevSecOps pipelines.




