Question

My Wordpress files are currently in a gitolite repo on my server. I want to take it live by symlinking the repo to /var/www. This way I could keep editing and push updates. But I don't know where to find the actual files.

I'd expect them to be in ~git/repositories/project.git, but looking around, I don't see them. Is there a way to do what I'm thinking?

Thanks

Was it helpful?

Solution

In Git, there are two different kinds of repositories: repositories that consist of a working copy and a folder called .git inside that contains Git's files, and bare repositories that don't have a working copy and are just the bare .git folder. You can only push to bare repositories, so server software such as gitolite is using these. You can tell by looking at a repository's name: by convention, the name of bare repositoriy ends with .git.

I want to take it live by symlinking the repo to /var/www. This way I could keep editing and push updates. But I don't know where to find the actual files.

The reason is they aren't there. There are several ways to achieve what you are trying to do; probably the most easy way is to use a post-receive hook on your server-side repository.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top