Created
July 6, 2009 14:19
-
-
Save bomberstudios/141457 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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