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這個文件後這個文件也不再是紅色了,而是變藍色,正常了!!!