1

I'm new to git, I followed this tutorial https://kb.mediatemple.net/questions/1594/Using+Git#gs to use git with mediatemple, using netbeans I can push changes successfully, but when I check the remote directory files aren't there! There's just a example.git file that contains some files, but my project files doesn't exit? What's the purpose of using GIT when we use it only to index changes in some format, how can I upload the updated files to the server?

Mohamed Said
  • 4,413
  • 6
  • 35
  • 52

1 Answers1

1

The answer is simple, that is a bare git repository. All your files are stored in the .git folder, they are simply hidden (converted to a format that is easier to handle) because nobody will modify it locally. Otherwise it is identical to your local repo.

If you're unsure, just go to a temporal folder and clone the remote repository. You'll have all the files if you were able to push without problems. Another way is to check the repo with the plumbing tools but I wouldn't recommend that if you're new to git :-) See some description here.

So if you want to automatically update the files, simply create a post-push hook that updates the local working copy after every push automatically. You can find tons of tutorials about that on the web, Google give me this for the first hit.

rlegendi
  • 10,466
  • 3
  • 38
  • 50
  • Yes I could clone the files, however my question is how can I use those files remotely :) I mean if there's an index.html add to the repos, I want to be able to view it when I go to mysite.com/index.html – Mohamed Said Sep 09 '13 at 13:21
  • You have a non-bare repository on your server that you pull the changes with from the bare remote. – Schleis Sep 09 '13 at 13:23
  • I'm sorry I didn't get it yet, how can I update the files on my server so that a visitors can check the newly updated files? should I ftp whenever I make a change? – Mohamed Said Sep 09 '13 at 13:39
  • Ah I see. So you want those files to be there? See my updated answer. – rlegendi Sep 09 '13 at 14:04