Skip to content
Infra X-Ray
AcademyExplore
Sign inCreate free account
Infra X-Ray

DevOps, simulated in your browser.

  • Academy
  • Explore
  • Roadmap
  • Contact
  • Privacy
  • Terms

Lesson 6 of 20

Branches are pointers; HEAD is you

11 min

Git: From First Commit to Team Workflows
FoundationsFree with an account
  1. What Git really stores
  2. Setting up: config, init and clone
  3. The three trees
  4. Inspecting: status, diff, log and show
  5. Ignoring, removing and renaming files
BranchesFree with an account
  1. Branches are pointers; HEAD is you
  2. Merging: fast-forward and three-way
  3. Merge conflicts, calmly
  4. Tags and releases
Undoing and rewritingFree with an account
  1. restore and reset
  2. revert: undoing published history
  3. stash: putting work aside
  4. rebase, and when to rebase vs merge
  5. cherry-pick: taking one commit
  6. reflog: getting lost commits back
Working with a teamFree with an account
  1. Remotes: fetch, pull and push
  2. Pull requests and branching models
  3. Team accidents: rejected pushes and force
Power toolsFree with an account
  1. Finding a bug's origin: blame and bisect
  2. Hooks and automation
Final exam
  1. Academy
  2. Git: From First Commit to Team Workflows
  3. Branches

Branches are pointers; HEAD is you

A branch is a name for a commit that moves when you commit. HEAD says which branch you are on.

  • 11 minutes
  • 3 quiz questions
  • Lab: 6 steps
  • Free with an account
Loading the lesson…
Previous lessonIgnoring, removing and renaming filesNext lessonMerging: fast-forward and three-way

Lesson 6 of 20

Branches are pointers; HEAD is you

11 min

Git: From First Commit to Team Workflows
FoundationsFree with an account
  1. What Git really stores
  2. Setting up: config, init and clone
  3. The three trees
  4. Inspecting: status, diff, log and show
  5. Ignoring, removing and renaming files
BranchesFree with an account
  1. Branches are pointers; HEAD is you
  2. Merging: fast-forward and three-way
  3. Merge conflicts, calmly
  4. Tags and releases
Undoing and rewritingFree with an account
  1. restore and reset
  2. revert: undoing published history
  3. stash: putting work aside
  4. rebase, and when to rebase vs merge
  5. cherry-pick: taking one commit
  6. reflog: getting lost commits back
Working with a teamFree with an account
  1. Remotes: fetch, pull and push
  2. Pull requests and branching models
  3. Team accidents: rejected pushes and force
Power toolsFree with an account
  1. Finding a bug's origin: blame and bisect
  2. Hooks and automation
Final exam
  1. Academy
  2. Git: From First Commit to Team Workflows
  3. Branches

Branches are pointers; HEAD is you

A branch is a name for a commit that moves when you commit. HEAD says which branch you are on.

  • 11 minutes
  • 3 quiz questions
  • Lab: 6 steps
  • Free with an account

Sign in to continue

This lesson is free with an account.

A free account saves your progress and opens every free lesson, quiz and lab. In this course that is all five modules.

Create free accountSign in

Want to look around first? This lesson's lab runs in Explore, the sandbox, with no account.

Open Detached HEAD in Explore
Previous lessonIgnoring, removing and renaming filesNext lessonMerging: fast-forward and three-way