LinuxCommandLibrary

git-reset-file

Reset a single file to a specific revision

TLDR

Reset file to HEAD

$ git reset-file [file]
copy
Reset file to specific commit
$ git reset-file [commit] [file]
copy

SYNOPSIS

git reset-file [commit] file

DESCRIPTION

git reset-file resets a single file to its state at a specific commit. Part of git-extras, it provides a convenient shortcut for resetting individual files without affecting the rest of the working tree.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community