git之 You are in the middle of a merge -- cannot amend問題解決方法

解決方法:

git reset --merge

注:取消合併

git rebase

注:將當前分支重新設置基線

git diff -w +衝突的文件

注:查看衝突點,修改衝突的文件,達到提交的狀態。

git rebase --continue

注:讓rebase繼續處理

git add

注:追加修改後的文件

git rebase --continue

注:讓rebase繼續處理,查看是否有其他文件未提交

git commit --amend

注:提交修改後的代碼

git push +分支

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