Medium Git Challenges - Intermediate Practice
Ready for more complex scenarios? Practice multi-step workflows, branch management, conflict resolution, and collaboration patterns used in professional development teams.
Managing .gitignore Patterns
🎯MixedLearn to properly configure .gitignore to exclude files you don't want to track, and how to handle files that were accidentally committed.
Feature Branch Workflow
💻TerminalThe standard workflow for developing a new feature is to create a dedicated branch. This keeps the 'main' branch clean and allows for code reviews before merging.
Keep Your Branch Updated with Rebase
🎯MixedYour feature branch was created yesterday. Today, main has several new commits. Use rebase to build your feature on top of the latest main, keeping a clean linear history.
Pull Remote Updates with Rebase
🎯MixedYou have local commits on main, but a teammate pushed new commits to origin/main. Use git pull --rebase to avoid unnecessary merge commits.
Resolving Merge Conflicts
💻TerminalYou've been working on a feature, and in the meantime, someone else changed the same line of code on the 'main' branch. It's time to merge, and you need to resolve the conflict.
Fork Workflow and Creating Pull Requests
🎯MixedYou want to contribute to an open-source project. Learn the fork workflow: create your own copy, make changes, and submit a pull request.
Squash Commits Before Pull Request
🎯MixedYour feature branch has messy commit history: 'WIP', 'fix typo', 'actually fix it'. Before submitting a PR, clean it up by squashing commits into one logical change.
Code Review Workflow and Amending Commits
💻TerminalAfter pushing your feature branch, a reviewer requests changes. Learn to amend your commit and update the pull request.
Reset Explained: Soft, Mixed, and Hard
🎯MixedYou've made a commit you want to undo locally. git reset is the tool, but it has three modes: soft, mixed, and hard. Understanding them is key to avoiding data loss.
Reverting Pushed Commits Safely
💻TerminalYou've pushed a commit to a shared branch that introduced a bug. You can't use git reset because it rewrites history. The safe way is with git revert.