Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 923 Bytes

3.0-branching.md

File metadata and controls

33 lines (21 loc) · 923 Bytes

3.0 Branching

Covered commands + concepts:

  • git branch
  • git checkout

Branching is a way for us to work on different features in an isolated environment.

As we've talked about in this lesson, commits are repository snapshots. snapshots

A branch is a pointer to a commit (the most recent commit in the branch history). branch pointer

We can have multiple branches. branches

And we know which branch we're in with HEAD. head looks at branch

We can switch branches. head looks at other branch

And we can commit in a branch, which will update both the branch and the HEAD pointer. commit in branch

We can commit again. moving pointers

And then we can switch branches. move head after commit