鍍金池/ 問答/PHP  Linux/ git add添加tp項(xiàng)目發(fā)現(xiàn)少文件

git add添加tp項(xiàng)目發(fā)現(xiàn)少文件

想通過部署tp5框架到linux服務(wù)器上,但是git add的時候發(fā)現(xiàn)只有24個文件,當(dāng)下文件夾里用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/項(xiàng)目文件夾      #打開項(xiàng)目目錄
env -i git reset --hard            #在目標(biāo)文件夾中執(zhí)行,更新到最新版本庫中文件 
=========結(jié)束符=========

為什么提交的時候不會更新呢?昨天寫的還是可以更新的。已經(jīng)添加了X執(zhí)行,文件用戶也設(shè)置成了git

回答
編輯回答
情未了

你看一下根目錄下的.gitignore文件里面是不是把那些你想上傳的文件和目錄給忽略了

2017年1月6日 20:03