stash changes before checkout 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
# 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