我正在使用git開發一個項目(沒有隊友,只有我)。 我一直在做提交,合併和推動他們到遠程(所有無序的希望,我學會如何重新組裝和修復歷史)現在我想重新設置已經在遠程的所有更改(只有1主分支1用戶),通過rebase我的意思是我想壓扁並重命名一些提交。在git推出後不能擠壓提交 - Visual studio
我用的是他們在這個鏈接... How to squash commits in git after they have been pushed?建議的命令,但問題是,我得到了一些錯誤,我不明白他們,這裏是顯示問題的截圖:
===========================錯誤作爲文本============== ==================
使用的命令:
git rebase -i origin/master~2 master
(它應該只顯示2提交,但由於某種原因,它顯示了2個以上,像40+)
錯誤消息:
interactive rebase in progress; onto 9bdd944
Last commands done (15 commands done):
pick 7af3656 "commit message"
pick 7355eff "another commit message"
Next commands to do (110 remaining commands):
pick fc10330 "another commit message"
pick f22d8c0 "another commit message"
You are currently rebasing branch 'master' on '9bdd944'.
nothing to commit, working tree clean
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyways, use:
git commit --allow-empty
Otherwise, please use 'git reset'
Could not apply 7355eff... "another commit message"
========= ==================錯誤作爲文本============================= ===
它看起來像一團糟,任何幫助我解決這個問題的提示將不勝感激,我是新的使用Git,我敢打賭,這將是一些高級用戶容易。
請將錯誤作爲文本發佈。不是每個人都可以讀取你的圖像... –
它看起來像你選擇「選擇」,而不是從你張貼的圖像「壁球」...如果你只是使用「Pick」的一切,它只是重新應用當前提交...相反,編輯每一行並將動作設置爲「s」或「squash」。 – jessehouwing
@umläute對不起,我不知道,我將作爲文本張貼..... – lbtg