git stash changes and apply to new branch
Save current changes to the stash
Checkout the branch where you want to apply the changes
See the files which are modified in the stash.
git checkout -b <branch_name>
Print the stashed changes.
git stash show
Bring stashed changes to staged in the current branch.
git stash show -p
To verify the changes are stagged to the current branch
git stash pop