Git post-receive hook. Move everything except a few folders

不打扰是莪最后的温柔 提交于 2019-12-06 18:16:30
VonC

I am manually removing these folders after the push

You could just ad this step in your hook

The other way is to try and set up a sparse checkout (since you can exclude folders in the sparse-checkout file).

echo "/*" > .git/info/sparse-checkout
echo "!folder1/" >> .git/info/sparse-checkout
echo "!folder2/" >> .git/info/sparse-checkout
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!