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?

1

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

4 Comments

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
You have a non-bare repository on your server that you pull the changes with from the bare remote.
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?
Ah I see. So you want those files to be there? See my updated answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.