2017-03-06 11 views
0

私は5つのコミットをレビュー用にgerritにプッシュしました。 1、2、3、4、5Gerritはabondonedコミットの同じブランチで変更をコミットします

レビューは今

私の第二のコミット放棄し、1を受け入れ、3、4、5、3、4と5が原因放棄さの変化にプッシュすることができないと言います。

誰かが3,4,5の変更をブランチにプッシュする方法を教えてください。

5つのコミットはすべて同じブランチにあります。 COMMIT-5とローカルリポジトリで

答えて

0

は、次のコマンドを実行し、checkouted:

git rebase -i COMMIT-1 

エディタはこのようなもので開きます:

pick COMMIT-2 COMMIT-2-MSG 
pick COMMIT-3 COMMIT-3-MSG 
pick COMMIT-4 COMMIT-4-MSG 
pick COMMIT-5 COMMIT-5-MSG 

# Rebase xxxxx..xxxxx onto xxxxx 
# 
# Commands: 
# p, pick = use commit 
# r, reword = use commit, but edit the commit message 
# e, edit = use commit, but stop for amending 
# s, squash = use commit, but meld into previous commit 
# f, fixup = like "squash", but discard this commit's log message 
# x, exec = run command (the rest of the line) using shell 
# d, drop = remove commit 

変更」に "ピック" COMMIT-2行にドロップし、エディタを閉じてコミット2を履歴から削除します(確認するには "git log"を実行します)。プッシュ・ジェリット

注:このような状況を回避するには、一度に複数のコミットをGerritに送信しないでください。常にコミットを並列に行います(詳細はhere)。

関連する問題