WebStorm:merge master之後,明明解決完衝突了,解決完的衝突文件不能提交怎麼辦?

1,在終端敲入:

git status

結果是:

Unmerged paths:
  (use "git add <file>..." to mark resolution)

        both modified:   src/typescript/request/WebRequest.ts

可以看到:依然在提示你:沒有合併的文件依然是這個文件

2,接下來你敲入:

 git commit

結果是:

U       src/typescript/request/WebRequest.ts
error: Committing is not possible because you have unmerged files.
hint: **Fix them up in the work tree, and then use 'git add/rm <file>'**
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.

可以看到這個提示語:Fix them up in the work tree, and then use 'git add/rm

所以,解決方法是:git–>add 這個文件 再提交衝突文件 就可以了!!!
add這個文件後這個文件也不再是紅色了,而是變藍色,正常了!!!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章