how to add the changes to a different branch git code example
Example 1: git commit current changes to existing branch
git stash
git checkout other-branch
git stash pop
Example 2: update one branch to another
git checkout feature1
git merge develop