Rebasing Feature Branches with Master when using Gerrit

2,197 views
Skip to first unread message

krishna chaitanya kurnala

unread,
Dec 23, 2014, 5:51:09 PM12/23/14
to repo-discuss, Shawn Pearce
Hello All

I bumped into this scenario and want to know if anyone faced and solved the same problem i am trying to solve.

push a change to master branch on gerrit
swith and commit locally on feature branc (fb)
rebase with master branch before push (pick up 1 new commit)
push a change to gerrit for the fb.

Gerrit now created so many new changes instead of creating just 1 new change for the new commit on feature branch.

Is there a way we can work around this type of behaviour ? What is the best way to keep feature branches in sync with master whille all of them are configured to use.
(rebase ?? or merging master branch to feature branches at regular intervals (concerned if the git history gets corrupt) )

Kindly suggest.

Thanks

Krishna 

Marcelo Ávila

unread,
Dec 24, 2014, 5:42:39 AM12/24/14
to krishna chaitanya kurnala, repo-discuss, Shawn Pearce
You can't rebase in this case... if you want to keep fb in sync with master you need to merge the master into fb and submit this merge to fb, like commit G in example below. Do not mix other changes with this merge commit.

A---B---C---D   => master
 \       \
  E---F---G---H => feature



--
Marcelo Ávila de Oliveira

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages