1

我是 git 新手。作为实践,我正在研究 2 个分支,比如 program_1、program_2。

git branch program_1
ls temp
git branch program_2 # (create program_2 branch)
git checkout program_2
git merge program_1 program_2 # (as i need temp folder in program_2)
# Add some files in temp folder (say 1.c, 2.c)
git add temp/1.c temp/2.c
git commit
# <some explanation reg commit>
git review

我在这里遇到冲突。

You are about to submit multiple commits. This is expected if you are
submitting a commit that is dependent on one or more in-review
commits. Otherwise you should consider squashing your changes into one
commit before submitting.

The outstanding commits are:

9610151 (HEAD, program_2) program_2 submitting for review
8760f55 (program_1) Adding temp to program_1

Do you really want to submit the above commits?
Type 'yes' to confirm, other to cancel: 

那么这意味着什么?以及如何解决这个问题?我错过了什么?

谁能知道答案?

4

1 回答 1

0

git review不是标准 git 的一部分,所以这完全取决于开发它的人来回答这个问题。

但是我会告诉你,将两个或多个提交提交给 gerrit 进行审查并没有什么奇怪的,我一直都这样做。

将会发生的是,它们之间将具有依赖关系,并且无论它们以什么顺序被审查,它们都将按该顺序提交。

这是处理相互依赖的小型逻辑提交的最佳方式。

于 2015-04-07T06:38:10.930 回答