git checkout -- <file>
This will revert the file back to the the last checked out version. git checkout <sha-1> -- <file>
Will revert a file to the state it was in, in that particular sha-1. git checkout -- <file>
This will revert the file back to the the last checked out version. git checkout <sha-1> -- <file>
Will revert a file to the state it was in, in that particular sha-1.