Git revert file to a specific commit or revision

Revert a file to a specific version, by using the `git checkout' command.

$ git checkout <commit> -- path/to/file.txt

For example, revert an icon to a previous state.

$ git checkout 807eff29 -- static/images/icons/world.svg
Did this help you? Please let me know with a comment. Thank you
Posted .

Comments (RSS)

Leave a comment