我使用git review
命令将一次提交(名为“ A commit”)发送到评审(Gerrit)。
现在,我创建了一个新的提交(名为“ B commit”),并希望将其发送到评审,但我不想重新发送“ A commit”。它们之间没有依赖关系。
如何针对特定提交将评审发送到Gerrit?
更新:
$ git add --all
$ git status
# On branch delete_role
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: path/to/file.ext
$ git status
# On branch delete_role
nothing to commit (working directory clean)
$ git branch
*delete_role
master
$ git log --graph --decorate --oneline -n13
* 531bd84 (HEAD, delete_role) commit 3
* df68f1a (master) commit 2
* 4ce2d8d commit 1
* 6751c7d (origin/master, origin/HEAD, gerrit/master)
提交记录 "df68f1a" 和 "4ce2d8d" 相互依赖,并且它们已经在之前的 git review
命令中被发送,但是提交记录 "531bd84" 属于一个新分支 (delete_role),因为它是一个新的问题。
$ git review
You have more than one commit that you are about to submit.
The outstanding commits are:
531bd84 (HEAD, delete_role) commit 3
df68f1a (master) commit 2
4ce2d8d commit 1
我希望只将“531bd84”提交发送到Gerrit,而不是其他提交。