错误原因:

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

错误差不多,用以上方法解决了我的问题,这里做下转载记录 

 

相关文章:

  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
  • 2021-09-13
  • 2022-03-04
猜你喜欢
  • 2022-12-23
  • 2021-06-17
  • 2021-07-05
  • 2021-11-16
  • 2021-07-24
  • 2021-10-12
  • 2022-02-07
相关资源
相似解决方案