Brandn

My website

Sep 4th, 2008 @ 1:27 am

With a local only git repo, push to empty remote repo

Assuming you’ve already been working on your project locally and there’s no origin repo that you cloned from, rather than zip it and then unzip it on your server, create an empty repo on the server and push to it.

$ cd my_local_repo
$ git remote add origin remote_server:/remote/path/on/server.git
$ git push origin master

Archive · RSS · Theme by Novembird