Learn by doing! Complete these hands-on projects to master Git and GitHub.
Scenario: You're building a personal portfolio website and want to track your progress using Git. This project teaches you the fundamentals of Git workflow.
Goal: Create a repository, make commits, create branches, and push to GitHub.
Create a new folder for your portfolio and initialize Git:
Add the basic HTML structure:
Create a CSS file and track it:
Add an about section on a new branch:
Create a repository on GitHub and push your code:
Add a .gitignore file to exclude node_modules/ and .DS_Store files. Create a develop branch for ongoing work.
Scenario: You're working with a team on a blog. Multiple people are editing the same files, leading to merge conflicts you need to resolve.
Goal: Experience and resolve merge conflicts, practice collaboration workflows.
Scenario: Practice the complete open source contribution workflow by forking, making changes, and creating a pull request.
Goal: Master the fork-and-pull workflow used in open source projects.
Use the "first-contributions" repository or create your own:
Find a real open source project with "good first issue" labels and make an actual contribution! Start with documentation fixes or typo corrections.
Scenario: A bug was introduced somewhere in the last 20 commits. Use git bisect to find exactly when it was introduced.
Goal: Master git bisect for efficient debugging.
git bisect skip if a commit can't be testedScenario: Practice recovering from common Git disasters: deleted branches, lost commits, accidental resets, and more.
Goal: Build confidence in recovering from any Git mistake.
git reflog first - it's your time machinegit fsck --lost-found for orphaned objectsShort, focused exercises to practice specific Git skills:
Create 5 commits following conventional commit format:
feat: add user authentication
fix: resolve memory leak in parser
docs: update API documentation
Create 10 messy commits, then use interactive rebase to squash them into 3 clean commits.
Create two branches with different features. Cherry-pick specific commits from one to the other.
Create 3 different stashes with descriptive messages. Apply them in different order.
Create semantic version tags (v1.0.0, v1.1.0) and practice listing and pushing tags.
Create 5 useful Git aliases and document what each does.