Git Playground
Master Git step by step. Type commands in the terminal to solve the tasks and visualize standard repository workflows.
Your Progress0 XP
Learning Path
Foundations
1-5
Task 1: Initialize a repository
Task 2: Check repository status
Task 3: Stage a file (add to index)
Task 4: Create your first commit
Task 5: View commit history with git log
Branching Basics
6-10
Task 6: Create a feature branch
Task 7: Switch to a branch with checkout/switch
Task 8: Make commits on a feature branch
Task 9: Switch back to main branch
Task 10: Merge a feature branch
Inspecting Changes
11-13
Task 11: Review differences with git diff
Task 12: Stash work in progress
Task 13: Restore stashed work
Advanced History
14-16
Task 14: Rebase for linear history
Task 15: Cherry-pick specific commits
Task 16: Create a release tag
Collaboration
17-20
Task 17: Add a remote repository
Task 18: Push commits to remote
Task 19: Fetch updates from remote
Task 20: Pull changes from remote
Investigation
21-24
Task 21: Search commit history
Task 22: Revert a problematic commit
Task 23: Reset to a previous commit (hard reset)
Task 24: Clean untracked files
Advanced Fixes
25-30
Task 25: Amend the last commit
Task 26: Restore files from staging area
Task 27: Understand the detached HEAD state
Task 28: Create a merge conflict (intentionally)
Task 29: Resolve a merge conflict
Task 30: Abort a merge in progress
History Rewriting
31-33
Task 31: Interactive rebase to reorganize history
Task 32: Squash commits together
Task 33: Recover lost commits with reflog
Branch Management
34-39
Task 34: Find who changed what with git blame
Task 35: Compare commits between branches
Task 36: View file history with git log
Task 37: Delete a local branch
Task 38: Delete a remote branch
Task 39: Rename or move a branch
Remote Workflows
40-41
Task 40: Work with multiple remotes
Task 41: Force push carefully (destructive operation)
Advanced Tooling
42-44
Task 42: Use git bisect to find the breaking commit
Task 43: Set up Git hooks for automation
Task 44: Work with git submodules
Best Practices
45-46
Task 45: Write professional commit messages
Task 46: Configure Git for your workflow
Foundations
Active Task
Initialize a repository
Every great project starts with Git initialization. Running 'git init' creates a hidden `.git` folder that will track all future changes to your project. This is the foundation—without it, Git can't help you manage your code. Think of it as setting up a new journal for your project's history.
Repository Live Graph
Before
No commits yet
bash
Welcome to the Git Playground Terminal. Learn by doing!
~/playground$