Skip to content

Instantly share code, notes, and snippets.

@lbj96347
Created December 2, 2013 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lbj96347/7745778 to your computer and use it in GitHub Desktop.
Save lbj96347/7745778 to your computer and use it in GitHub Desktop.
auto-git-bare-init
#!/bin/sh
if [ ! -n "$1" ]
then
echo "error!! repository is none"
else
mkdir $1
echo "build a new repository : $1"
cd $1 && git --bare init && chown -vR git objects refs/heads
echo "complete"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment