Git Basics
Record history, work on branches, merge, and undo mistakes - using the real git CLI.
- Your first commitinit, add, commit and log - the core Git loop. · 10 min · beginner
- Branches and mergingWork on a feature in isolation, then merge it back into main. · 12 min · intermediate
- Undoing mistakesDiscard edits, unstage files, and revert a bad commit safely. · 12 min · intermediate
- Ignoring files with .gitignoreUse .gitignore to keep temporary, generated, and environment-specific files out of Git. · 10 min · beginner
- Stashing uncommitted work in GitSave uncommitted work, switch branches for a hotfix, and restore with Git Stash. · 10 min · intermediate
- Resolve merge conflicts safelyResolve a real Git conflict, keep both changes, and finish a merge without losing history. · 15 min · intermediate
- Rebase and cherry-pickReplay a branch onto a newer main, copy one commit across branches, and squash WIP commits. · 15 min · intermediate