[Git] 踩坑
-
Git-warning: CRLF will be replaced by LF in XXX .
- 解決方案:
git config core.autocrlf false //將設置中自動轉換功能關閉 - 問題解釋和分析
warning: CRLF will be replaced by LF in XXX . The file will have its original line endings in your working directory.
CRLF : windows 環境下的換行符
LF : linux 環境下的換行符
這個錯誤的意思,就是文件中存在兩種環境的換行符,git 會自動替換 CRLF 為 LF ,所以提示警告。
https://git-scm.com/book/zh/v1/%E8%87%AA%E5%AE%9A%E4%B9%89-Git-%E9%85%8D%E7%BD%AE-Git#%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%B8%8E%E7%A9%BA%E7%99%BD
- 解決方案:
-
remote: error: unable to unlink old 'vendor/jakub-onderka/php-console-color/phpunit.xml': Permission denied
- 解決方案:
修改 服務器上 文件權限
文件原權限 root , 改為git
chown git:git . -R
- 解決方案:
-
git-gc - Cleanup unnecessary files and optimize the local repository
總結
- 上一篇: 在Debian 上安装php zip扩
- 下一篇: Laravel 中 Controller