Switch between branches
git checkout main
-
This will switch to the
mainbranch. -
See that the changes have “disappeared”.
-
Make some other change on the
mainbranch to README.txt. -
See that the two have diverged (use
gitk --all).
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
git checkout main
This will switch to the main branch.
See that the changes have “disappeared”.
Make some other change on the main branch to README.txt.
See that the two have diverged (use gitk --all).