git-unpack-file

Extract blob contents to a temporary file

TLDR

Unpack blob to temp file
$ git unpack-file [blob_hash]

SYNOPSIS

git unpack-file blob

DESCRIPTION

git unpack-file creates a temporary file with a blob's contents and prints the filename. It is a low-level plumbing command for accessing blob contents outside of the working tree, used internally during merges and by scripts that need direct access to a blob's data.

INSTALL

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

CAVEATS

Creates a file named .merge_file_XXXXXX in the current directory. Git does not remove it automatically; the caller is responsible for deleting it once done.

SEE ALSO

git-cat-file(1), git-hash-object(1)

RESOURCES

Documentation · Source code