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

Comments

Leave a Reply