LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-reset-file

Reset a single file to a specific revision

TLDR

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

SYNOPSIS

git reset-file file [commit]

DESCRIPTION

git reset-file resets a single tracked file to its state at HEAD, or at a given commit if one is provided. Part of git-extras, it unstages the file and checks out its content from that revision, without touching the rest of the working tree or index.

INSTALL

sudo apt install git
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

CAVEATS

The file argument comes first, followed by the optional commit; passing them in the wrong order silently fails since the second argument is treated as a commit-ish. The file must currently exist in the working tree.

SEE ALSO

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid