summaryrefslogtreecommitdiff
path: root/bin/git-unbare
blob: 1a10b4adc4fde0d6d5b7726078ea047f03360129 (plain)
1
2
3
4
5
6
7
8
9
10
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