2017-03-06 86 views
0

我有5个提交推送给gerrit进行审查。说1,2,3,4,5Gerrit在同一分支上提交更改absoluteed commit

审阅抛弃我的第二个承诺,并接受1,3,4,5

现在,3,4和5不能由于放弃了改变推。

有人请让我知道如何推3,4,5变成分支。

所有5个提交都在同一分支上。

回答

0

在本地资源库,与凯明-5 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行中,保存,关闭编辑器,并将commit-2从历史记录中删除(运行”git log“确认)。推到Gerrit。

注意:为避免出现这种情况,请不要向Gerrit发送多行提交。始终平行地处理您的提交(更多信息here)。

相关问题