1. 程式人生 > >Git沖突:You have not concluded your merge

Git沖突:You have not concluded your merge

ast -- -c 如何 提示 cal 鏈接 files -m

You have not concluded your merge. (MERGE_HEAD exists)

Git本地有修改如何強制更新

我嘗試過用git pull -f,總是提示 You have not concluded your merge. (MERGE_HEAD exists)

我需要放棄本地的修改,用遠程的庫的內容就可以,應該如何做?傻傻地辦法就是用心的目錄重新clone一個!
正確的做法應該是:

  • git fetch --all
  • git reset --hard origin/master
  • git fetch 只是下載遠程的庫的內容,不做任何的合並git reset 把HEAD指向剛剛下載的最新的版本

參考鏈接:

Git沖突:You have not concluded your merge