make new branch with unstaged changes code example
Example 1: commit unstaged changes to new branch
git checkout -b new_branch_name
Example 2: revert unstaged changes git
git checkout -- .
git checkout -b new_branch_name
git checkout -- .