BowerStudios.com

  • My Lab
  • Family
  • Friends
  • Professional
  • About
Home

Git - Add Remote Repository

daniel —Tue, 11/30/2010 - 11:42am

  • Build Management and Source Control

$ 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:00am

I 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?

  • Log in to post comments

Navigation

  • Search
  • Recent content
  • Contact Me
  • Mail
  • Pass Hasher
  • Bower Studios Admin

Quotes

daniel —Thu, 04/16/2009 - 8:20am

If at first you don't succeed, find out if the loser gets anything.

—

Bill Lyon

  • Log in to post comments
  • daniel's quotes

Popular content

Last viewed:

  • Syslog with Rails3 - The Bare Minimum
  • Extending a logical volume to take advantage of existing space
  • Using XmlSlurper in a service
  • Find foreign keys referencing a table: postgres
  • Liquibase, simpler than I thought it would be

Copyright 2021 Daniel Bower
  • My Lab
  • Family
  • Friends
  • Professional
  • About