linux git 推送空資料夾
阿新 • • 發佈:2018-10-31
參考連結:http://www.cnblogs.com/chenfulin5/p/7827024.html
git 管理 Linux 檔案系統有兩個問題,第一個是 Linux 根檔案系統的 root 許可權問題,第二個就是git不上傳空檔案問題。
一、 root許可權問題的話就得在 root 使用者下git , 只要 su 一下就行了。
二、git 部上傳空檔案問題: 參考: http://www.cnblogs.com/zengjfgit/p/6243817.html
原理是將所有的空檔案都加一個 .gitignore 檔案
find . -name .git -prune -o -type d -empty -exec touch {}/.gitignore \; find . -name .git -prune -o -type d -empty -exec touch {}/.emptyFolders \;