Skip to content

Instantly share code, notes, and snippets.

@bomberstudios
Created July 6, 2009 14:19
Show Gist options
  • Save bomberstudios/141457 to your computer and use it in GitHub Desktop.
Save bomberstudios/141457 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# A script to create a new remote git repo in git
#
# 1. Make sure to setup ssh keys for passwordless logins
#
# 2. Add this to $HOME/.ssh/config:
# Host git
# HostName your.domain.com
# User username
ssh git "mkdir git/$1.git; cd git/$1.git; git --bare init"
mkdir $1
cd $1
git init
git remote add origin git:git/$1.git
git config branch.master.remote origin
git config branch.master.merge master
git config push.default matching
touch .gitignore
git add .gitignore
git commit -m "Created repo"
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment