我從origin
中提取更新我的本地文件,並且一個文件發生衝突的更改。我解決了衝突,但我不能承諾(本地),因爲混帳仍認爲該文件是相互矛盾的:Git:即使我已經解決了衝突,也不能提交文件
$ git add style.css
這工作 - 沒有錯誤或任何東西。然後:
$ git commit
Merge branch 'dev' of [origin] into dev
Conflicts:
[path]/style.css
#
# It looks like you may be committing a MERGE.
# If this is not correct, please remove the file
# .git/MERGE_HEAD
# and try again.
#
爲什麼不能正常工作?
當你嘗試'git status'時會顯示什麼? –
它將'style.css'列爲已修改。然而,我甚至試圖完全拋棄這些變化(它們很小),'git commit'仍然說'style.css'是衝突的! – daGUY
這可能只是提交消息。默認消息列出了最後發生衝突的文件。 'git log'顯示合併? – vergenzt