2015-04-07 68 views
1

我是git的新手。作为练习,我正在研究2个分支,比如program_1,program_2。git review无法推送我的更改

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: 

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

任何人都可以知道答案吗?

+1

您如何阅读该文本? – poke

回答

0

git review不是标准git的一部分,所以真正由谁来开发它来回答这个问题。

但是我会告诉你尽可能多地把两个或两个以上的提交提交给gerrit进行审查,我一直这么做。

会发生什么事情是他们之间会有依赖关系,他们会按照这个顺序执行,不管他们按照什么顺序进行审查。

这是处理相互依赖的小逻辑落实的最佳方法。