-
-
Save airblade/1017290 to your computer and use it in GitHub Desktop.
Create a new git repository on a remote server. Assumes that you're sitting in an initialized Git repo.
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
function new-git () { | |
ssh [email protected] "mkdir $1.git && cd $1.git && git --bare init" | |
git remote add origin [email protected]:$1.git | |
git push origin master | |
git config branch.master.remote origin | |
git config branch.master.merge refs/heads/master | |
git config push.default current | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment