git move all modified files to another 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: git commit current changes to existing branch
git stash
git checkout other-branch
git stash pop