1. 程式人生 > 實用技巧 >git rebase --continue出現“If there is nothing left to stage,chances are that something else already introduced the same changes; you might want to skip this patch.”

git rebase --continue出現“If there is nothing left to stage,chances are that something else already introduced the same changes; you might want to skip this patch.”

在git pull rebase的時候有衝突,在臨時分支上找到衝突檔案,解決衝突後,執行了git add .,然後執行git rebase --continue出現“If there is nothing left to stage,chances are that something else already introduced the same changes; you might want to skip this patch.”

解決方法

建議:先git log 將這次commit的版本號複製貼上 儲存下來,以防操作失誤,丟失程式碼!

當前分支(開發分支A)
git commit -m '我要提交' git pull
--rebase ... 出現衝突,自動跳到了基於開發分支A的臨時分支a 當前分支(臨時分支a) 第一步:找到衝突檔案,解決衝突 第二步:git add . 第三步:git rebase --continue 這個時候會出現“if there is nothing ....”,不用管它 第四步: git rebase --skip 這步執行後會自動跳回開發分支A 當前分支(開發分支A)
可以git log 看看當前最新的提交資訊還是不是 “我要提交”,沒有問題,就可以進行下面的步驟了 第五步:git pull
--rebase ... 第六步:git push ...