0

I've been trying to get a copy of my web app on PHP Fog, but it needs to be sent by Git. I'm completely new to Git, and to be honest, I don't understand it. I followed several tutorials (the best I found was http://rogerdudler.github.com/git-guide/), and I still can't get my web app to upload. As I understand it, I need to first add my local files to a new git repository. Then I need to 'push' this repository to the remote server's repository.

On this last step I get an error; "Updates were rejected because the tip of your current branch is behind its remote counterpart. Merge the remote changes before pushing again". And I have absolutely no idea how to go on from here.

if you want to use any paths (or other variables) in your examples, these are the ones (I believe) are needed in my case:

local folder:  
     C:\wamp\www\webgame
clone command provided by PHP Fog: 
     $ git clone git@git01.phpfog.com:webgame.phpfogapp.com

If you need any more info, please do ask.

Simon Verbeke
  • 2,905
  • 8
  • 36
  • 55
  • [Git - delete everything and upload new version](http://stackoverflow.com/questions/11071420/git-delete-everything-and-upload-new-version) – Snger Sep 24 '12 at 14:26

1 Answers1

1

There are some earlier pushes on the remore server's repository. Pull the changes, merge and then push your changesets.

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
  • I started all over and did the following: init repository, add all files, do a commit, push all to remote server. feedback from git tells me it's worked, but my app is showing blank pages on PHPFog now. I seriously don't know what I'm supposed to do. (Git is back to 90's it seems. FTP is so much simpler...) – Simon Verbeke Sep 24 '12 at 14:46
  • 1
    What will you do if 100 programmers are working with the very same files and uploading them to the very same FTP, overwriting each-other's work? I think you don't want that, so FTP in itself is not supporting team-work. Git and Mercurial does support them. You need a VCS for development. As regarding to your problem maybe something is misplaced (location-level problem) – Lajos Arpad Sep 24 '12 at 15:30
  • But that's not the case. I'm the only programmer. It's just a project to learn php with. I'll try some different file arrangements, and see if I can get it to work. At least I can upload my files now, thanks! – Simon Verbeke Sep 24 '12 at 15:34
  • You are working on a system. The system might grow in the future and there you are, in the situation of team work. It's better to be ready for that. Also, with git you can trace your working history which might be useful sometimes. – Lajos Arpad Sep 24 '12 at 16:45