Search

I'm new to Git and I've been trying out bits and bobs from Jonas's tutorial but I'm stuck at deploying my site to a public repo on GitHub.

Can anyone expand on this section for me (or point me to another appropriate tutorial)?

Middleweight: deploying your site to public or private repositories Suppose you want to host a copy of your site’s repository on Github, or use a local development repository and occasionally push it to another server. You’ll maintain a link to the official repository for core updates, but change the origin to your own repository.

git remote add symphony git://github.com/symphonycms/symphony-2.git

git remote rm origin

git remote add origin git@github.com:username/site.git

git push origin master

Thanks, D

Ah sure, starting playing around with git quite recently.

By setting your own origin you can make and save any changes. Such as the sub-modules and the versions of each that you are using, any config settings etc..

Then if you need to push changes to another server - your server would be checking up on the git repository that you set-up for any changes and pull them back from github or your private git repository.

Main Advantage - in my view, is that whoever you give the repository to they will always have the exact same set-up as you including the correct sub-modules (should run same commit as you have) and whenever you run Symphony Updates - your config sub-modules etc.. would not be over-written. (anyone correct if I have a wrong impression.

Thanks, gunglien; I think I understand the principle.

I also think I (just about) understand the first three commands above; just to check, in the third line, should the repository (site.git in the example, right?) exist already, or can/does that command create it on the go?

I don't understand the fourth command; should I copy it word-for-word? If I do at present, I get an error:

'ERROR: Repository not found. fatal: The remote end hung up unexpectedly'

I'm trying to do this from a repo in MAMP – not sure if that's important for any reason.

I suppose, first, I'd like to understand what I'm trying to do with the fourth command, then (ideally) I'd like to make it work!

EDIT: I might have answered one of my own questions – it looks like the repo has to exist on GitHub before I run the final command. Is that right?

ERROR: Repository not found. fatal: The remote end hung up unexpectedly

Sounds like you're not connecting to Github properly. Make sure you've configured SSH keys: http://help.github.com/mac-set-up-git/

Thanks, Nick; do I have to do that for every repo I create?

do I have to do that for every repo I create?

No. Your SSH key, once added to the list at GitHub, will allow you access to all of your GitHub repos.

OK – well, I've done that (I think) successfully. I believe my original problem stemmed from the fact that I hadn't created a repo on GitHub ahead of running the final command. I've got it working now and I think I might be a step closer to figuring out what the hell I'm doing!

Thanks

Github's guides are ace — they will walk you through everything you need to know.

Thanks, Nick; bedtime reading ahoy!

There is a cool way to create a repo from the command line, but I can't find where it is not.. you use their API from command line to make your repo: stackoverflow post

Thanks moonoo2, but to be honest, I'm happy to do it the simplest way possible (at least until I understand what I'm doing a bit better).

If I'm honest, I was a little bit hasty posting in the first place; I should have spent a couple of hours R-ing TFM (apologies).

Happily, since then (and after a lot of groaning/head-scratching), I have managed to deploy a whole site to GitHub successfully.

It's cool.

Trial and error = experience :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details