3 ms·
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 i
by X-Istence 13y ago
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.
- fayyazkl 13y agoYeah this will definitely do that. Only that mentioning name per file is painful. In large source trees, you often exactly don't know which files have been modified. You just have been following through a debug path making changes where needed. Just having the ability to checkout a folder down the hierarchy is really handy. Git recently added "sparse checkouts" but still they only solve the problem partially