diff options
Diffstat (limited to 'bin/git-unbare')
-rwxr-xr-x | bin/git-unbare | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/git-unbare b/bin/git-unbare new file mode 100755 index 00000000..1a10b4ad --- /dev/null +++ b/bin/git-unbare @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ "$(git config --local --bool core.bare)" = "true" ]; then + mkdir .git + mv * .git + git config --local --bool core.bare false + git reset --hard +else + echo >&2 "fatal: repository is not bare" + exit 1 +fi |