开发者

Web-based git: how to copy all files except some to webroot?

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 f开发者_JS百科iles 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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜