GitLearn
1. windows下 出现Filename too long错误
原因:windows下文件名的长度限制为255个字符,而git的版本库路径中包含了很多文件,所以导致文件名超出限制。
解决方法:
输入命令: git config --system core.longpaths true
重新尝试 push/pull。
2. git pull出现fatal: refusing to merge unrelated histories错误
原因:在git pull时,远程分支和本地分支的提交历史不同,导致合并失败。
解决方法:
先执行
git fetch
拉取远程分支的最新提交。然后执行
git merge origin/master
合并远程分支的最新提交。
GitLearn
http://47.97.104.205/2024-08-27/GitLearn/