3 ms·
If you want to revert a file in git, you are not reverting the file. Reverts are attached to commits. Instead, you are restoring a file to its previous state.
by twolfson 13y ago
If you want to revert a file in git, you are not reverting the file. Reverts are attached to commits.
Instead, you are restoring a file to its previous state. To do this:
git checkout <commit> -- path/to/file