A note on using git for web development.
Let’s start with some background information, the site I was working on was a typical wordpress blog running with wp-super-cache and hosted on a slice. I usually develop on my local server with git. I then push the site to my slice.
The trouble came when I decided to revert my code back to a previous instance, and after reviewing my site, I pushed the updates to my slice and turned on wp-super-cache. But after a few hours I noticed my site was continually going offline. Even though it never affected any of the other sites I hosted on that server.
The problem was that git doesn’t remember file permissions and I forgot to tell git to ignore the cache folder. So when I reverted back to a different version it also reverted the cache folder, its contents, and proceeded to change the permissions to what I assume was the default permissions when I first initiated the repository. So not being able to write to the cache folder made wp-super-cache crash the apache process and eventually all the apache processes took all the memory.
So when using git don’t forget to reset your permissions, when reverting back to an earlier instance of code.
This entry was posted on Monday, December 22nd, 2008 at 4:06 pm and is filed under Coding, Git. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.











