在执行git push提交项目更新时发生错误,无法提交更新。。
错误信息

Tried to save uncommitted changes in stash before Update, but failed with an error. Couldn’t stash file://E:/webStudy/document-delivery-and-data-storage-system-js: document-delivery/src/views/dashboard/Monitor.vue: needs merge。

通过错误提示我们知道了是有一个未被提交的改动。
解决方法

  1. 打开IDEA项目,在控制台下输入:git status 。请注意图片下面Unmerged paths这一段内容。
    git提交失败问题:Couldn't save uncommitted changes
  2. 找到原因,此时需要删除both deleted: 后面的 document-delivery/src/views/dashboard/Monitor.vue这个文件。
  3. 控制台输入 git rm document-delivery/src/views/dashboard/Monitor.vue。 当看到如下信息这说明删除ok。
    git提交失败问题:Couldn't save uncommitted changes
  4. 此时再次执行git push,显示提交成功。

希望记录当前所踩过的坑来记录自己的成长。

相关文章:

  • 2021-11-29
  • 2022-03-02
  • 2021-09-26
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2021-06-13
  • 2021-09-25
猜你喜欢
  • 2022-12-23
  • 2021-10-12
  • 2021-06-17
  • 2021-07-05
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
相关资源
相似解决方案