Created
September 16, 2023 04:06
-
-
Save roelds/e1c8f7c67588400ed6753e1ce81c1b1f to your computer and use it in GitHub Desktop.
Git sha256 in Git 2.42+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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