Branches and switching
A branch is a movable reference to a commit. Creating a branch does not duplicate every file; switching updates the working tree to match that branch. git switch -c creates and selects a branch. Commit or safely preserve edits before changing contexts. git switch -c feature-note creates a named work stream, and git branch identifies it with an asterisk in the listing. Short-lived branches separate unfinished work from the main line and provide clear boundaries for review, testing and eventual integration into shared history. Leaving unrelated uncommitted edits while switching branches can carry work into the wrong context; inspect status and commit coherent changes before switching.
git switch -c feature-note creates a named work stream, and git branch identifies it with an asterisk in the listing.
Short-lived branches separate unfinished work from the main line and provide clear boundaries for review, testing and eventual integration into shared history.
Leaving unrelated uncommitted edits while switching branches can carry work into the wrong context; inspect status and commit coherent changes before switching.