0

I have set up git on our webserver in a similar fashion as: http://toroid.org/ams/git-website-howto

The following post-receive hook is set up:

#!/bin/sh
GIT_WORK_TREE=/var/www/ git checkout -f

This works fine. However, there are certain directories and files that I do not want to copy to the webroot, but I do want them in the repository (so .gitignore is not an option). What is a good way to ignore them when checking out? Or should I copy them and then promptly remove them?

1 Answers1

0

There was already the same question on Stack Overflow, with a solution: Reuse GIT_WORK_TREE in post-receive hook to rm a few files

Community
  • 1
  • 1
TimWolla
  • 31,849
  • 8
  • 63
  • 96