I have executed the following command
git add <foo.java>
git commit -m "add the foo.java file"
How can I delete my local commit now and unstage foo.java?
If I type git reset --hard
, I found that it reverts my modified foo.java
to the original one.