git stash save your-file-name git checkout master # do whatever you had to do with master git checkout staging git stash pop