commit unstaged code example
Example 1: commit unstaged changes to new branch
git checkout -b new_branch_name
Example 2: revert unstaged changes git
git checkout -- path/to/file/to/revert
git checkout -b new_branch_name
git checkout -- path/to/file/to/revert