錯誤原因:
Couldn't save uncommitted changes. Tried to save uncommitted changes in stash before Update, but failed with an error. Couldn't stash file://H:/IdeaProjects/SVSP_0.4: git-write-tree: error building trees Cannot save the current index state
經過逐步排查發現是同事上傳了多余的文件造成了集體無法更新,解決方案如下:
進入你的項目目錄,我的目錄是:H:\IdeaProjects\SVSP_0.4,右鍵選擇Git Bash here
輸入git status會看到如下信息,注意是Unmerged paths這一段
Unmerged paths: (use "git reset HEAD <file>..." to unstage) (use "git rm <file>..." to mark resolution) both deleted: .idea/artifacts/SVSP0_4.xml
找到原因,是上傳了多余的文件,需要刪除both deleted: 后面的 .idea/artifacts/SVSP0_4.xml這個文件
輸入 git rm .idea/artifacts/SVSP0_4.xml
再次進入IDEA更新即可解決問題
轉載:https://blog.csdn.net/lujiachun1/article/details/85248558
錯誤差不多,用以上方法解決了我的問題,這里做下轉載記錄
