Idea update failure problem: couldn’t save uncommitted changes solution

An error occurred during the update of the project today, which could not be solved after a long period of debugging.
error reason:

  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

After gradual investigation, it was found that colleagues uploaded redundant files, which caused the collective failure to update. The solution is as follows:
Enter

    into your project directory. My directory is H:\IdeaProjects\ svsp_0.4 . Right-click on Git Bash here and type Git status. Notice the 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
    was found because there were extra files uploaded, and both deleted: followed by .idea/artifacts/ svsp0_4.xml this file is typed in git rm.idea /artifacts/ svsp0_4.xml and then enter the idea update to resolve the problem

Read More: