π 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
Pull Requests β Team collaboration on GitHub.
Reset & Revert β Safely undoing mistakes.
Stashing β Saving incomplete work without committing.
Cherry-picking β Selecting specific commits across branches.
Rebasing β Keeping commit history clean.
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
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 β¨