Use `git checkout` to switch the active working branch, so new commits affect that branch rather than `main`. It can also resolve a conflict by selecting a remote version of a file. section 2.5.1 section 2.4.2
Common uses include:
- Switch to an existing branch with `git checkout rules_based_model`. section 2.5.1
- Return to the main branch with `git checkout main`. section 2.5.1
- Keep a remote version during a conflict with `git checkout --theirs 1_process_data.py`. section 2.4.2
Developing a rules-based model
Create `rules_based_model`, switch to it, and commit model changes there. Checking the branch list shows an asterisk beside `rules_based_model`; switching back to `main` allows the branch to be merged. section 2.5.1
Listing 2.27 git checkout [different branch] will switch to a different branch so any commits you make will be made to this branch
git checkout rules_based_model #1
See the exact command for switching from the current branch to `rules_based_model`. section 2.5.1
