0

I used to work with git and gitHub.
Mostly doing branches and then submit push request from branches.
And used gitHub review.

But, thing is a little bit different here:
We use rebase and cherry-pick a lot.
And we are using a review server, so when you push code you are actually push to a ref:
git push origin HEAD:refs/for/master

And if you got comments and need to update.
You start with a clean master on local.
then: "git fetch..." to fetch the cherry pick from ref first
then: make your changes
then: "git commit --amend" to append change to previous commit
then: "git push origin HEAD:refs/for/master"

And the review server will identify the change and update the review instead of create a new one.

Now the question is: how can I keep working on new code, before the review is done.
One way I can think of is: I will discard all changes on local and checkout from master, and work on clean master.

But, what if I need to used some code in the review I just send, do I have to wait for the review to complete or the following changes need to be in the same review?
Is there a third way to have a new review but, include all change in previous reviews.

genpfault
  • 51,148
  • 11
  • 85
  • 139
user1947415
  • 933
  • 4
  • 14
  • 31
  • How about making a branch/copy of the one that is sent for review and work on it since it has stuff that master wont have ..wait for both to be reviewd and then cherry pick , rebase , merge or whatever on the branch level and then with master . – z atef Mar 03 '16 at 01:34
  • I am not sure if that would help. So, first, I start from clean master. Then, branch on local as branch_a. Then, fetch the first review to branch_a. Then, working on it. Then, what should I do? push from branch_a to refs/for/master? That will still include both changes together right? – user1947415 Mar 03 '16 at 01:41
  • not from master ... just create a branch from the branch you just pushed .. and yes it should have everything ... maybe minor conflict with spaces and stuff but you should be good. – z atef Mar 03 '16 at 01:51

0 Answers0