Suppose two set of changes are made in a project versioned by git. One set is staged and the other is not.
I would like to recheck staged changes by running my project a
The accepted answer also stashes staged changes as a few have pointed out. Here's a way to do it without getting your staged changes in the stash.
The idea is to do a temporary commit of your staged changes, then stash the unstaged changes, then un-commit the temp commit:
# temp commit of your staged changes:
$ git commit --message "WIP"
# -u option so you also stash untracked files
$ git stash -u
# now un-commit your WIP commit:
$ git reset --soft HEAD^
At this point, you'll have a stash of your unstaged changes and will only have your staged changes present in your working copy.