I am working on a file where the my current commit ended up being bad and I want to go back to earlier commits for a specific file?
I did a search it looks like no one has answered a similar question (how to roll back changes in a file in a previous commit in git)….
Hopefully a simple answer?
It will overwrite easily so beware with your file wildcards, which do can cover several files at once. For help, you can check out the
git logmessages with the wanted files as a filter:Will show only those commits with log messages that involve the
<file>searched.