dotfiles/.local/bin/scripts/git-initserver

9 lines
178 B
Plaintext
Raw Normal View History

#!/bin/sh
git init -b main
git config -v receive.denyCurrentBranch false
hook=".git/hooks/post-receive"
echo '#!/bin/sh
git --work-tree=.. checkout -f' >$hook
chmod -v +x $hook