stash changes before checkout from the branch code example
Example: stash changes before checkout from the branch
# Assuming you are on dev branch
$ git stash save "Code in dev branch to be included in feature branch"
$ git checkout feature
$ git stash pop