用dreamwever做網(wǎng)站小程序
解決git push時的too_many_commits提示
提示內(nèi)容
push時報錯如下:
Sorry, you were trying to upload xxxxxx commits in one push
原因分析
這個應(yīng)該是因為在提交規(guī)則里配置了 一次只允許提交一個 commit,這樣當(dāng) icode 上有 commit 沒有合入時,再次提交一次新的 commit 的話會觸發(fā)這個錯誤。
解決方案
git status 檢查本地是否存在多個commit
如果存在多個commit,或者commit是已經(jīng)合入的情況
執(zhí)行以下命令撤銷提交后再次commit,push
git pull --rebase
git reset --soft origin/dev001(分支名)
git commit -m '吧啦吧啦吧啦'
git push origin HEAD:refs/for/dev001(分支名)