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

9 lines
178 B
Bash
Executable File

#!/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