I have edited some files in working stage (not added them with git add -A. no commitment).
Now I would like to revert the changes back to the last commit in my local branch.
What is to do?
I already searched a bit and found:
git rebase -i HEAD
but then I get:
Cannot rebase: You have unstaged changes.
Please commit or stash them.
So what is the right way?
You can throw away all your uncommitted changes with:
WARNING: this really will get rid of all your changes that are staged or just in your working tree and go back to the state of the last commit, so use it with care.
If you might want your local changes back again, and just want to get them out of the way temporarily (e.g. to work on something else) you could just do:
… instead