This is what browsers do when user selects a file.
This will create a new commit in order to revert the existing changes.