git-reset-file(1)

git-reset-file1

Reset one file

Usage

git-reset-file [<filename>] commit-hash

Overview

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

Releases

5 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13

Author

Written by Sasha Khamkov <[email protected]>

Reporting bugs

<https://github.com/tj/git-extras/issues>

From git-extras 7.3.0-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.