πŸš€ Week 4 – Git & GitHub Advanced Challenge

This week’s focus was on mastering advanced Git concepts that are essential in real-world DevOps workflows.
From collaborating through Pull Requests to maintaining a clean commit history, this challenge gave me the hands-on experience to work like a pro in a team-based environment.


πŸ”Ή Topics Covered

  1. Pull Requests – Team collaboration on GitHub.

  2. Reset & Revert – Safely undoing mistakes.

  3. Stashing – Saving incomplete work without committing.

  4. Cherry-picking – Selecting specific commits across branches.

  5. Rebasing – Keeping commit history clean.

  6. Branching Strategies – Industry best practices for workflows.


πŸ›  My Hands-On Journey

1️⃣ Pull Requests (PRs) – Collaborating in Teams

  • Forked & cloned a repository.

  • Created a feature-branch, made changes, and pushed to GitHub.

  • Opened a PR, requested review, and merged after approval.

πŸ’‘ Best Practices Learned:

  • Write clear PR titles & descriptions.

  • Link issues in PRs for better tracking.

  • Address review comments promptly.


2️⃣ Undoing Changes – Reset & Revert

Experimented with:

  • git reset --soft β†’ Keep changes staged.

  • git reset --mixed β†’ Unstage but keep changes.

  • git reset --hard β†’ Remove all changes.

  • git revert β†’ Safely undo without altering history.

πŸ’‘ Key Insight:

  • Use reset for local, unpublished changes.

  • Use revert for changes already pushed/shared.


3️⃣ Stashing – Save Work Temporarily

  • Modified files without committing.

  • Used git stash to save work.

  • Switched branches and restored changes using:

    • git stash pop β†’ Apply & remove stash.

    • git stash apply β†’ Apply but keep stash.

πŸ’‘ Use Case: Perfect when you need to quickly switch context without committing unfinished work.


4️⃣ Cherry-Picking – Selective Commits

  • Found the target commit hash using git log.

  • Applied it to another branch using git cherry-pick <hash>.

  • Resolved conflicts with git cherry-pick --continue.

πŸ’‘ Why It’s Useful:
Great for applying urgent bug fixes without merging entire branches.
⚠ Caution: Overuse can lead to duplicate commits & conflicts.


5️⃣ Rebasing – Clean History

  • Fetched the latest main branch updates.

  • Ran git rebase origin/main on my feature branch.

  • Resolved conflicts & continued the rebase.

πŸ’‘ Merge vs Rebase:

  • Merge β†’ Preserves history but adds extra commits.

  • Rebase β†’ Creates a linear, clean history (ideal for feature branches before merging).


6️⃣ Branching Strategies – Industry Standards

Studied and simulated:

  • Git Flow – Feature, Release, Hotfix branches.

  • GitHub Flow – Simple & great for continuous deployment.

  • Trunk-Based Development – Frequent small merges into main branch.

πŸ’‘ Best for DevOps:
Trunk-Based Development + CI/CD ensures faster releases and fewer merge conflicts.


πŸ“Έ Highlights from My solution.md

  • Documented exact commands, when to use them, and risks/benefits.

  • Included real scenarios for each concept.

  • Added branching strategy diagrams for clarity.


πŸ“š Key Takeaways

  • Git is more than add, commit, push – advanced features make collaboration smoother.

  • Pull Requests & code reviews are crucial for high-quality code.

  • Rebasing and cherry-picking are powerful but must be used carefully.

  • Choosing the right branching strategy impacts delivery speed & team efficiency.


πŸ’¬ My DevOps Learning Journey continues with more real-world challenges ahead.
If you’re starting out, practice these Git features daily – they’re the backbone of modern development.


πŸ“€ Connect With Me

πŸ”— Blog Series: https://hashnode.com/@VaishnaviTandekar
πŸ’» GitHub Repo: 90DaysOfDevOps


πŸ”– Hashtags:

#90DaysOfDevOps #Git #GitHub #VersionControl #DevOps #Collaboration #GitFlow #Rebase #PullRequest #BranchingStrategies


0
Subscribe to my newsletter

Read articles from Vaishnavi Tandekar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vaishnavi Tandekar
Vaishnavi Tandekar

Hey there! I’m Vaishnavi πŸ‘‹ Learning DevOps step by step πŸ› οΈ Writing what I learn so no one learns alone ✨