Saturday, January 19, 2013

Making a Remote Repo via bsh

Making a Remote Repo via bsh

Make the directory you want your remote repo to be in
mkdir MyRemoteGitDir

Go into that directory
cd MyRemoteGitDir 
Init with bare
git init --bare

Go to local git repo directory
cd MyLocalGitDir

Adds a new remote location to your local git repo named origin
git remote add origin

Your output should look something like this.
>MyRemoteComputerName/MyRemoteGitDir *

//push the content of your master branch to remote repo named origin
git push origin master  

//check yourself

git remote
>origin


congrats you have made a remote repo

*note* the syntax for a git or ssh is different for this