bring unstaged changes to new branch code example
Example 1: how to move unstaged changes to different branch
git stash
git checkout -b new-branch
git stash pop
Example 2: commit unstaged changes to new branch
git checkout -b new_branch_name
Example 3: revert unstaged changes git
git checkout -- .