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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:52:07+00:00 2026-06-17T09:52:07+00:00

When I have a branch like this: A—B—C topic / D—E—F—G master and merge

  • 0

When I have a branch like this:

      A---B---C topic
     /
D---E---F---G master

and merge topic back to master, I’ll get this:

      A---B---C topic
     /         \
D---E---F---G---H master

Now, even if I remove the topic branch (let’s say it was just a local development branch and I only push master) I’ll still have the information, that there was a feature implemented starting at E and finished at H.

Is it possible to keep the same kind of imformation even, when there were no simultaneous commits on the master branch, while I was working on the topic branch? For example:

      A---B---C topic
     /
D---E master

If I merge now, I’ll get this:

D---E---A---B---C master/topic

If I remove the topic branch, I’ll have no information in the future, where the feature implemented in the topic branch was finished. And even if I keep the branch, I don’t know where it started.

I would prefer to keep both parents and have something like this:

      A---B---C topic
     /         \
D---E-----------F master

I think this is the default behavior of svn. Can I achieve the same with git?

  • 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-06-17T09:52:09+00:00Added an answer on June 17, 2026 at 9:52 am

    Yes, using the --no-ff flag will create a merge commit even if the merge resolves to a fast-forward case. Example (assuming you started at C):

    git checkout E
    git merge --no-ff C
    

    More information is available at the git-merge(1) documentation.

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

Sidebar

Related Questions

Let's say we have an object model like this: public class Category { public
I have a master branch like this.. A -- B -- C -- D
I have a history that looks a little like this right now: origin/master |
Say we have this situation: master | A--B--B--D--E--F--G | test Then we merge test
Let's say I have an XML like this: http://ws.audioscrobbler.com/2.0/?method=track.getInfo&api_key=b25b959554ed76058ac220b7b2e0a026&track=Just%20for%20Me&artist=Hinoi%20Team I want to get the
Ok so I Have a branch in git that looks like this A-B-C-D-E and
I have a git commit history like this: U / A---B---C---D---E master Nothing points
I have created a branch like this svn copy svn+ssh://foo.bar/svn/myproject/trunk svn+ssh://foo.bar/svn/myproject/branches/feature-x I then proceeded
I have a path like this one: C:\Development.TFS\Examn\R4-branch\Web\OrganisationManager\themes\blue\css And I need a regex to
I have this query which returns qty in each of my branch. now the

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.