Git Tutorials & Guides
Practical guides with interactive examples. Learn Git from the basics to advanced workflows.
git init: Creating Your First Repository
Learn how to create a Git repository from scratch. Understand what git init does, what's inside the .git folder, and how to make your first commit.
git commit: Saving Your Work Step by Step
Master the git commit workflow. Learn how to stage files, write great commit messages, amend commits, and use visual staging tools.
Git Branches Explained: Create, Switch, and Manage
Understand Git branches from the ground up. Learn to create, switch, list, and delete branches with clear examples and visual explanations.
git merge vs git rebase: When to Use Each
Understand the difference between merge and rebase, when to use each strategy, and how to handle conflicts. Includes visual commit graph examples.
git stash: Save Work Without Committing
Learn how to use git stash to temporarily save changes. Covers stash, pop, apply, list, and managing multiple stashes with practical examples.
git status & git diff: Understanding What Changed
Learn how to inspect your repository with git status and git diff. Understand the three file states, read diff output, and review changes before committing.
git pull & git push: Syncing Your Code with the Team
Learn how to sync your local repository with a remote server. Understand git fetch, git pull, and git push, and handle common issues like rejected pushes and merge conflicts.
Resolving Merge Conflicts: A Step-by-Step Guide
Learn how to read and resolve Git merge conflicts with confidence. Understand conflict markers, resolve step by step, and use visual tools to make the process painless.
Your First Pull Request: A Complete Workflow
Walk through the complete pull request workflow from branch to merge. Learn branch naming conventions, how to write a good PR, and manage the review process.
.gitignore: Keeping Secrets and Junk Out of Your Repo
Learn how to use .gitignore to exclude dependencies, build output, secrets, and OS files from your repository. Includes pattern syntax, templates by language, and how to untrack already committed files.
Writing Better Commit Messages: A Practical Guide
Learn how to write clear, useful commit messages. Covers the subject-body-footer structure, Conventional Commits, and AI tools that help you write better messages.
git reset & git restore: Undoing Mistakes Safely
Learn how to undo changes at every stage of the Git workflow. Covers git restore for file-level undo, git reset --soft/--mixed/--hard for commit-level undo, and git revert for shared branches.
Line-Level Staging: Committing Only What You Need
Master partial staging with git add -p and visual tools. Learn to stage individual hunks and lines for clean, focused commits from messy coding sessions.
Reading git log Like a Pro
Master git log with practical examples. Learn useful flags like --oneline, --graph, and --author, plus how to search and filter your commit history.