参考:https://blog.csdn.net/technofiend/article/details/51361393html
http://www.jb51.net/article/110277.htmgit
https://blog.csdn.net/technofiend/article/details/70792815bash
http://blog.chinaunix.net/uid-29616823-id-4437149.htmlapp
1. 勾子post
在 .git/hooks/ 目录下
新建一个名为 post-checkout 的文件ui
将下列内容保存spa
#!/bin/sh
pwd
echo "This is post-checkout hook"
chmod -R 755 ./* && chown -R www:www ./*
使post-checkout能够被调用
.net
chmod +x post-checkout
unix
2. 让git忽略检查文件权限的改动:
code
git config core.filemode false执行该命令后便可