Skip to content

Instantly share code, notes, and snippets.

@roelds
Created September 16, 2023 04:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roelds/e1c8f7c67588400ed6753e1ce81c1b1f to your computer and use it in GitHub Desktop.
Save roelds/e1c8f7c67588400ed6753e1ce81c1b1f to your computer and use it in GitHub Desktop.
Git sha256 in Git 2.42+
# Git 2.42+
mkdir sha256
cd sha256
git init --object-format=sha256
git config extensions.preciousObjects true
git branch -m dev
dd if=/dev/zero bs=$((1024*1024)) count=$((5*1024)) | git hash-object --stdin --literally
# verify result :
dc18ca621300c8d3cfa505a275641ebab00de189859e022a975056882d313e64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment