Skip to content

Instantly share code, notes, and snippets.

@cirosantilli
Last active August 29, 2015 14:08
Show Gist options
  • Save cirosantilli/b51dd67840c97d44fcf7 to your computer and use it in GitHub Desktop.
Save cirosantilli/b51dd67840c97d44fcf7 to your computer and use it in GitHub Desktop.
git init --bare
sub_tree="$(printf "\
" | git mktree)"
root_tree="$(printf "\
040000 tree $sub_tree\tempty
" | 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