Skip to content

Instantly share code, notes, and snippets.

@cirosantilli
Created November 5, 2014 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cirosantilli/38d084d901ff0a4e6ca8 to your computer and use it in GitHub Desktop.
Save cirosantilli/38d084d901ff0a4e6ca8 to your computer and use it in GitHub Desktop.
git init --bare
empty_blob="$(printf '' | git hash-object --stdin -w)"
root_tree="$(printf "\
100644 blob $empty_blob\t$(printf '%1024s' ' ' | tr ' ' 'a')
" | git mktree)"
commit="$(git commit-tree -m 0 "$root_tree")"
git branch master "$commit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment