Git - Add Remote Repository
daniel Tue, 11/30/2010 - 11:42am
$ cd ~/Sites/myapp
$ git remote add origin ssh://myserver.com/var/git/myapp.git
$ git push -u origin master
Snippet from How to get a new remote repository going
The following may be needed if you leave out the -u in the git push argument, though I've not confirmed this.
Also needed to add the following config to the repo in .git/config
[branch "master"]
remote = origin
merge = refs/heads/master
This will allow you to simply do:
git push
instead of having to type this everytime (though you do need to do this on the very first push, but not afterwards):
git push origin master
- Log in to post comments
Comments
I might have something
Submitted by daniel on Fri, 12/03/2010 - 10:00amI might have something incorrect with the .git/config file. Pushing my repo up to the remote server works fine, but working with other people on the project seems to do something odd. Perhaps, use this method to populate the remote initially, and thereafter reclone the repo?