DEV Community

Cover image for My Git Learning Journey: Hands-On Tasks Every DevOps Beginner Should Master
Vivian Okose
Vivian Okose

Posted on

My Git Learning Journey: Hands-On Tasks Every DevOps Beginner Should Master

My Hands-On Git Learning Journey: Tasks, Lessons, and Real-World DevOps Skills

Introduction: Why Git Is Foundational in DevOps and Software Engineering

In modern software development and DevOps, Git is not optional — it is foundational. Every application, infrastructure script, automation pipeline, and configuration file lives somewhere in a version-controlled environment. Git enables teams to collaborate, track changes, recover from mistakes, and ship software confidently.

As a DevOps beginner, I quickly realized that understanding Git goes beyond memorizing commands. It’s about learning how teams work together, how changes flow from local machines to production, and how mistakes are handled safely. This blog documents my hands-on Git tasks and assignments, the challenges I faced, and the lessons that shaped my mindset as I continue my DevOps journey.


Learning Environment Overview

All tasks were completed in a practical, real-world setup, similar to what DevOps engineers use daily:

  • Linux Terminal: Used to execute Git commands and manage files
  • Local Repository: A Git repository initialized on my local machine
  • GitHub: Used as the remote repository for collaboration and backup
  • Remote Repository: Connected via HTTPS/SSH to push and pull changes

This environment helped me understand the full lifecycle of code — from local development to remote collaboration.


Git Tasks & Assignments Breakdown

1. Initializing a Git Repository

Goal:
Create a version-controlled project from scratch.

Commands Used:

  • git init
  • git status

What the Commands Do (Simple Explanation):

  • git init creates a new Git repository in the current folder
  • git status shows the current state of the repository and tracked/untracked files

Challenges Faced & Solution:
Initially, I didn’t understand why files weren’t being tracked automatically. Running git status helped me realize that Git requires explicit staging before tracking changes.

Real-World Relevance:
Every project starts with repository initialization. This mirrors how teams set up new services, automation scripts, or infrastructure repositories.


2. Staging and Committing Changes

Goal:
Track changes and save meaningful checkpoints in the project.

Commands Used:

  • git add
  • git commit -m "message"

What the Commands Do:

  • git add stages changes for commit
  • git commit saves a snapshot of the staged changes with a message

Challenges Faced & Solution:
I initially staged too many unrelated changes at once. I learned to stage only relevant files to keep commits clean and readable.

Real-World Relevance:
Clear commits make debugging, reviewing, and auditing changes easier in professional teams.


3. Working with Branches

Goal:
Create isolated environments for features and experiments.

Commands Used:

  • git branch
  • git checkout -b
  • git switch

What the Commands Do:

  • git branch lists or creates branches
  • git checkout -b creates and switches to a new branch
  • git switch moves between branches safely

Challenges Faced & Solution:
At first, I merged branches without fully understanding what changed. Reviewing branches carefully before merging helped prevent errors.

Real-World Relevance:
Branching is critical in team workflows where multiple features are developed simultaneously.


4. Merging Branches

Goal:
Combine feature work into the main branch.

Commands Used:

  • git merge

What the Command Does:

  • Integrates changes from one branch into another

Challenges Faced & Solution:
I encountered merge conflicts and learned to read conflict markers carefully and resolve them manually instead of panicking.

Real-World Relevance:
Merge conflicts are common in real projects. Knowing how to resolve them calmly is an essential DevOps skill.


5. Connecting to a Remote Repository

Goal:
Push local changes to GitHub and synchronize work.

Commands Used:

  • git remote add origin
  • git push
  • git pull
  • git clone

What the Commands Do:

  • git remote add links a local repo to GitHub
  • git push uploads commits
  • git pull fetches and merges remote changes
  • git clone copies a remote repository locally

Challenges Faced & Solution:
Authentication issues and push errors taught me the importance of correct remote URLs and branch alignment.

Real-World Relevance:
This mirrors daily DevOps workflows involving CI/CD pipelines, remote collaboration, and backups.


Lessons Learned (Reflective Section)

Working through multiple Git assignments taught me lessons that go beyond syntax:

  • Small commits matter: They make debugging easier and improve code reviews.
  • Clear commit messages are powerful: A good message tells a story of why a change exists.
  • Understand branches before merging: Blind merging can break stable code.
  • Think before running Git commands: Git is powerful, but careless commands can create confusion.

These lessons helped me move from “running commands” to understanding impact.


Common Git Mistakes Beginners Make (and How to Avoid Them)

  • Committing everything at once: Stage intentionally.
  • Vague commit messages: Always explain the purpose.
  • Working directly on main: Use feature branches.
  • Ignoring git status: It’s your best debugging tool.

Avoiding these mistakes builds confidence and professionalism.


Mindset Shift: How Git Changed My Thinking

Learning Git changed how I view mistakes. Errors are no longer failures — they’re recoverable states. Git taught me that collaboration doesn’t mean chaos when proper version control exists. It encouraged me to think in terms of history, traceability, and teamwork, not just code execution.


Reflection: Growth and Confidence

Completing these Git tasks transformed Git from an intimidating tool into a trusted ally. I now approach repositories with confidence, understand workflows better, and feel prepared to collaborate in team environments. Each task reinforced that hands-on practice beats theory every time.


Conclusion: Don’t Fear Git — Practice It

Git may seem complex at first, but consistency and hands-on practice make it approachable. Every command learned, every conflict resolved, and every commit made builds confidence. For beginners, the key is not perfection but progress.

As I continue my DevOps journey, I’m excited to apply these Git skills in real projects — from CI/CD pipelines to infrastructure automation — knowing that Git will always have my back.

Top comments (0)