I have executed the following command
git add git commit -m \"add the foo.java file\"
How can I delete my local commit now
git reset --soft is just for that: it is like git reset --hard, but doesn't touch the files.
git reset --soft
git reset --hard