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 7038427
In Process

The Archive Base Latest Questions

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

I am still trying to move from git towards git-flow. I know I can

  • 0

I am still trying to move from git towards git-flow. I know I can use any kind of git feature within git-flow, but I am mostly interested in what it handles automatically.

Let’s assume there are two developers Alice and Bob, working on feature A and B respectively. When Alice is done, she can do a git flow feature finish A to create a merge commit on her local develop branch based on commit C. Now if Bob finishes his feature at the same time, and he fetched the same stuff, his merge commit will also be based on C. Now if Alice pushes and then bob fetches again, he will have to merge or rebase and we end up with a non-linear history on the develop branch, in case he merges.

Is this correct so far, or does git-flow somehow handle this situation automatically? If there is some automatic mechanism, what will have to be set up for this to work?

The simplest solution would probably be to always fetch develop before finishing features. However I am not sure that this is actually possible, depending on the way the repository is shared (might not be available at that time).

EDIT (clarifications of the problem):

As the answers suggest, my example was not clear. So first a picture of what I think is the problem:

C is the initial commit on the develop branch.

Alice creates some feature work on the feature branch:

develop    feature/A
|           |
v           v
C-A1-A2-A3-A4

At the same time Bob also does work for another feature

C-A1-A2-A3-A4
 \
  B1-B2-B3-B4

Now Alice finishes the feature and the merge commit is added to develop (I want that).

  A1-A2-A3-A4
 /           \
C-  -  -  -   MA

Now Bob finishes the feature and again a merge commit is added to develop (I also want that, just at another place:

  A1-A2-A3-A4
 /           \
C-  -  -  -   MA <- develop for Alice
 \
  \ -  -  -   - MB <-develop for Bob
   \           /
    B1-B2-B3-B4

However now either Alice or Bob has to merge develop, creating an additional commit:

  A1-A2-A3-A4
 /           \
C-  -  -  -   MA-MAB <- I don't want this MAB commit
 \               / 
  \ -  -  -   - MB <-develop for Bob
   \           /
    B1-B2-B3-B4

What I would like to have instead would be something like this:

  A1-A2-A3-A4
 /           \
C-  -  -  -   MA-MB
 \               / 
  B1-B2-B3-B4- -

As you can see, the history is still non-linear, however the main line of the develop branch only contains the merge commits from features (and no additional merge commits as in the other case).

What I like about this, is that you can easily follow changes in the history and see if they belong to former feature branches or if they were merges in develop. All this information can be derived directly from the DAG.

Also if you use good messages for your merge commits on develop, in the second case you can easily derive a changelog, by always following the first parent on develop. However in the second case you sometimes need to follow the first parent only and sometimes more than one parent. And I cannot see an easy way when to do which that I could code up.

  • 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-28T01:40:05+00:00Added an answer on May 28, 2026 at 1:40 am

    git-flow does nothing like that.

    It’s intended to support the branching model described here (which is really just a pretty picture for the kinds of things Git developers recommend). That picture includes merges. You’ll see the same all through the text. Under each type of branch, you’ll see the types of branches they should be merged into. There are example commands, using --no-ff to forcibly avoid linear history, and instead record merge commits.

    This is a workflow that really uses Git, and one of Git’s core strengths is branching and merging. This workflow thrives on merging; nonlinear history is not only unavoidable but desired.

    You should read the section titled "Incorporating a finished feature on develop" from the description of the workflow. A short quote:

    The –no-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature.

    …

    Unfortunately, I have not found a way to make –no-ff the default behaviour of git merge yet, but it really should be.

    You want those merge commits. You really do.

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

Sidebar

Related Questions

I come from a mostly n-tier background, and I'm trying to move more towards
still trying to find where i would use the yield keyword in a real
I'm still trying to decide whether my (home) project should use UTF-8 strings (implemented
My brain apparently can't handle Git. I'm trying. I'm failing. All I want to
I am trying to move an object from one database into another. The mappings
I'm trying to switch back from my UIViewController to my UITableViewController but apperendly it's
I am trying to coordinate the move of a site from its current server
I had to move to the entlib logger from log4net. I know what you're
I am trying to move sql functionality from my app to xml, so the
I'm trying to move the status bar in Android (Froyo) from the top of

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.