Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6915377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:28:04+00:00 2026-05-27T09:28:04+00:00

I am trying to implement a ‘git-flow’ kind of workflow using Gerrit but I

  • 0

I am trying to implement a ‘git-flow’ kind of workflow using Gerrit but I can’t seem to figure out the last piece of the puzzle.

There are two preconditions to my problem:

  • Gerrit will only perform merging to one branch
  • I do not allow merge commits to be pushed to Gerrit. The merging has to be done by Gerrit after the changes are approved

What I want to solve is the following. Consider this git situation:

Master 0 
        \
         \
Develop   0-----0-----0-----0

There is a master branch with one commit and a develop branch which is forked from master with several additional commits. After a while the develop branch is merged back into master to create the next production release. The developers work with topic branches from develop and with strict rebasing. Their commits are always rebased on top of the latest upstream develop before pushing. This should result in linear history and only fast forward commits.

Now suppose someone creates a hotfix branch from master and merges back to master:

Master 0--------0 HF 
        \
         \
Develop   0-----0-----0-----0

This commit is now only merged to the master branch but the developers need this commit in their develop branch to incorporate the bugfix in their changes. Normally you would merge the master branch to develop the develop branch but considering my preconditions this is not possible as it would create a local merge commit.

My question is: how do I incorporate the new commits from the master branch into the local develop branch so that any new changes by the devs will contain the bugfix? Ideally I would modify my script to first apply the bugfix changes to the local develop branch (merging but without a merge commit) and then rebase the dev’s commits and push. This way the bugfix will be automatically added to their new changes and will be seen as such, as part of their new commits, not a seperate commit.

I’ve been thinking about possible solutions:

  • Cherry picking the commit to the develop branch. I believe this will always result in a duplicate commit when develop is merged with master the next time. Is there any way around this?
  • Rebasing as described here: http://davitenio.wordpress.com/2008/09/27/git-merge-after-git-cherry-pick-avoiding-duplicate-commits/ . This probably causes problems since the develop branch is published, or won’t it?

I hope my question is clear. Please let me know if it needs further clarification. I know I’m being pretty rigid with my workflow, but it would be ideal in combination with Gerrit. If it can’t be done then I will probably allow merge commits…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:28:05+00:00Added an answer on May 27, 2026 at 9:28 am

    After considering the options I have decided to abandon this method. It seems to me that Gerrit is targeted at single integration branch development for the most part.

    When changes need to be merged to two branches (eg. a hotfix that needs to go to master and develop) it makes you jump through all kinds of hoops which amount to extra work/reviewing. I’ve decided to stick to one branch.

    I think that the Git flow model doesn’t really suit in the Gerrit design. If other people have integrated Gerrit with Git flow I would love to hear about their methods.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to implement Piwik using REST API over http but need a little help.
trying to implement a dialog-box style behaviour using a separate div section with all
Trying to implement some nested loops that are spitting out good old nested html
im trying to implement simple secured client server communiction using WCF. when im launching
Im trying to implement a scenario using threads to execute concurrent commands on a
iam trying to implement an Searchmachine into my site. Iam using Zend_Search_Lucene for this.
I'm trying implement a bracket in my program (using C#/.NET MVC) and I am
Trying to implement AVAudioplayer and get some metering data of the played music, but
trying to implement a multiplayer. Using the sample from Game Center - Sending and
Trying to implement the new FP 10.1 Global error handler into my projects but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.