git Please move or remove them before you can merge. 錯誤解決方案


合並分支或者git pull命令的時候遇到:

Updating 7c9e086..936acac
error: The following untracked working tree files would be overwritten by merge:
Common/HFHttpRequest/HFHttpRequestParameters.h
Common/HFHttpRequest/HFHttpRequestParameters.m

Please move or remove them before you can merge.
Aborting

 解決方法,項目根目錄下運行git命令

$git clean -d -fx .

x -----刪除忽略文件已經對git來說不識別的文件

d -----刪除未被添加到git的路徑中的文件

f -----強制運行

注意:會把硬盤中,很多未被跟蹤的文件會被刪除!特別是新建的文件。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM