Git Essentials
Track your work with Git, branch and merge safely, undo mistakes, and share changes through a pull request.
5 trail maps · 9 articles · 24 min reading, plus a task to try in each article
Last verified
Start the trail
First up: Save your first commit, 3 min
Before you start
- Use a terminal. Run a command and read its output.
- Install Git.(opens in a new tab) Run git --version to check it works.
- Create a GitHub account.(opens in a new tab) You need this from Push and pull onwards.
Trail maps
- Getting started 2 articles
Save snapshots of your work and see what changed.
- Branching 2 articles
Work on an idea in isolation, then bring it back.
- Working with remotes 2 articles
Share your work and fix clashes with other people.
- Undoing mistakes 2 articles
Take back changes without losing work.
- Proof project 1 article
Put the trail together and prove you reached the destination.
- Article 1: Save your first commit3 min. Part of Getting started. Start here. Done.
- Article 2: See what changed3 min. Part of Getting started. Done. Learn first: Save your first commit.
- Article 3: Create and switch branches2 min. Part of Branching. Done. Learn first: Save your first commit.
- Article 4: Merge a branch2 min. Part of Branching. Done. Learn first: Create and switch branches.
- Article 5: Push and pull2 min. Part of Working with remotes. Done. Learn first: Save your first commit.
- Article 6: Resolve a merge conflict4 min. Part of Working with remotes. Done. Learn first: Merge a branch.
- Article 7: Undo changes safely3 min. Part of Undoing mistakes. Done. Learn first: See what changed.
- Article 8: Stash unfinished work2 min. Part of Undoing mistakes. Done. Learn first: Create and switch branches.
- Article 9: Ship a change with a pull request3 min. Part of Proof project. Done. Learn first: Push and pull, Resolve a merge conflict.
Getting started
Branching
Working with remotes
Undoing mistakes
Proof project
After this trail
- Rebasing(opens in a new tab) Keep a branch history straight instead of merging.
- Git hooks(opens in a new tab) Run checks automatically before each commit.
- Continuous integration Run tests on every push so broken changes are caught early.