How would you go about reverting a single file to previous commit state using git?

Git

Git Problem Overview


I wonder why isn't it implemented in the GUI? I know git has a content approach vs. single file approach but sometimes single file reverting is crucial.

For instance an .png graphics file from a few commits before is needed.

Probably I need to do a checkout but I'm still not sure as the concepts sometimes escape me.

Git Solutions


Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionkeepyourlibertyView Question on Stackoverflow