โ Git & GitHub learning pathGit & GitHub ยท Module 4 of 10
Branching
Work on features safely in branches.
๐ Key ideas
- A branch is an independent line of development.
- git branch feature creates; git switch feature moves to it.
- git switch -c feature creates and switches.
- main (or master) is the default branch.
- Keep main stable; build features in branches.
๐ก Real-life example: Branches are parallel notebooks: try ideas in one without messing up the main notebook.
BranchIndependent line of work
mainDefault branch
git switchChanges branches
HEADPointer to current commit/branch