Use a different or a newly created branch.
git checkout [branch_name]
In a single command, you can create and switch to a new branch right away.
git checkout -b [branch_name]
The git checkout -b bases the new_branch off the current HEAD. In the given example, existing_branch
will base new_branch off instead of the current HEAD.
git checkout -b [new_branch] [existing_branch]