summaryrefslogtreecommitdiff
path: root/bin/git-unbare
blob: 88c66d83dd018573a6604a9114350cf19edecd17 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

if [ "$(git rev-parse --is-bare-repository)" = "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