Skip to content

Instantly share code, notes, and snippets.

@jengo
Created September 10, 2012 17:59
Show Gist options
  • Save jengo/3692558 to your computer and use it in GitHub Desktop.
Save jengo/3692558 to your computer and use it in GitHub Desktop.
Create remote git repo
# Run this on the remote
export PROJECT=project
export OWNER="jengo.dev"
mkdir /git/$PROJECT.git
cd /git/$PROJECT.git
git init --bare
chown $OWNER /git/$PROJECT.git -R
git repo-config core.sharedRepository true
# Run this on the local
export PROJECT=project
export USER=jengo
export REMOTE_HOST="joped.com"
mkdir $PROJECT
cd $PROJECT
git init
touch README.md
git add *
git commit -m 'initial import'
git remote add origin $USER@$REMOTE_HOST:/git/$PROJECT.git
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment