5
How to discard all commited changes?
Example: I have a project that has a few dozen commits, assuming that at a given moment I decide to discard everything which has not yet been confirmed via commit, how can I do this?
Note: I roughly want to undo everything until the previous commit. What would be the best way to do this?
You can also use: git checkout filename
– Leandro Macedo
This would only work for files that have changed but haven’t been committed yet
– Vinicius Cainelli
It’s what’s being asked, not commited files
– res
Whoops, that’s right, whatever’s not committed.
git checkout .
reverts: changed, added and deleted files that have not been contemplated by a commit?– Fábio Jânio
That’s right, basically undoes the design changes
– res