Git – setting up a remote repository and doing an initial push


SUBMITTED BY: Guest

DATE: May 19, 2013, 2:57 p.m.

FORMAT: Text only

SIZE: 557 Bytes

HITS: 982

  1. Firstly setup the remote repository:
  2. ssh git@example.com
  3. mkdir my_project.git
  4. cd my_project.git
  5. git init --bare
  6. git update-server-info # If planning to serve via HTTP
  7. exit
  8. On local machine:
  9. cd my_project
  10. git init
  11. git add *
  12. git commit -m "My initial commit message"
  13. git remote add origin git@example.com:my_project.git
  14. git push -u origin master
  15. Done!
  16. Team members can now clone and track the remote repository using the following:
  17. git clone git@example.com:my_project.git
  18. cd my_project

comments powered by Disqus