summaryrefslogtreecommitdiff
path: root/bin/git-unbare
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2018-03-31 19:29:41 -0700
committerSean Whitton <spwhitton@spwhitton.name>2018-03-31 19:29:41 -0700
commit60f3a8613f08837984a4a28831089a531fa8505c (patch)
tree89820c20d3691d62481f4ae4e03d149200423780 /bin/git-unbare
parent8fe679e6adc0047838ed0e7f04f348c93dacbaaa (diff)
downloaddotfiles-60f3a8613f08837984a4a28831089a531fa8505c.tar.gz
replace develacc-push and develacc-push-all with git-develacc
Diffstat (limited to 'bin/git-unbare')
-rwxr-xr-xbin/git-unbare11
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