How do you clean uncommitted changes in your git repos?
I'm addicted to git stash && git stash drop
as a quick way to bring my repo. to a clean state. I am curious to know what is your way of doing this?
TIL checkout
takes a <path>
as an argument which you can use to go back to the "clean" state of the given <path>
.
So, you can use git checkout .
to remove all uncommitted changes in all the files (This will not have any effect on untracked files, though!)