想通过部署tp5框架到linux服务器上,但是git add的时候发现只有24个文件,当下文件夹里用ll可以看到有40个文件,问为什么会少文件呢?
还有一个问题就是git的hooks,添加了post-receipt,里面写的是
#!/bin/sh
#
# An example hook script for the "post-receive" event.
#
# The "post-receive" script is run after receive-pack has accepted a pack
# and the repository has been updated. It is passed arguments in through
# stdin in the form
# <oldrev> <newrev> <refname>
# For example:
# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
#
# see contrib/hooks/ for a sample, or uncomment the next line and
# rename the file to "post-receive".
#. /usr/share/git-core/contrib/hooks/post-receive-email
cd /wwwroot/www/项目文件夹 #打开项目目录
env -i git reset --hard #在目标文件夹中执行,更新到最新版本库中文件
=========结束符=========
为什么提交的时候不会更新呢?昨天写的还是可以更新的。已经添加了X执行,文件用户也设置成了git
青春有我