git-reset-file - Man Page
Reset one file
Examples (TL;DR)
- Reset a file to HEAD:
git reset-file path/to/file
- Reset a file to a specific commit:
git reset-file path/to/file commit_hash
Synopsis
git-reset-file [<filename>] commit-hash
Description
Reset one file to HEAD or certain commit-hash
Options
<filename>
The name of the file to reset.
<commit-hash>
(Optional) Hash of commit to reset the file to. Defaults to HEAD.
Examples
Reset one file to HEAD
$ git reset-file .htaccess
or reset one file to certain commit
$ git reset-file .htaccess dc82b19
Author
Written by Sasha Khamkov <sanusart@gmail.com>
Reporting Bugs
See Also
Referenced By
October 2017 Git Extras