I’m working on the PacKay Productions website today, and it occurred to me that since I’m using git on my desktop to track changes to our WordPress theme, I could also use it to sync changes to my server. Thinking about it, I knew the webserver would be a remote repository, and I could publish my changes by typing “git push web”, but I figured there had to be things I was overlooking, so I hit Google to see what other people had come up with.
That’s when I found “Using Git to manage a web site.” It not only pointed out what I was overlooking–that if I made the website itself a git repository, I’d also be syncing all the .git files into the webroot and possibly exposing them to the public–it also had a solution: using the post-receive hook to deploy changes from a git repository sitting outside the webroot into a directory inside the webroot.
It’s a quick little read. I like it.