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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:37:09+00:00 2026-06-09T04:37:09+00:00

In our Git repository we have a few merges from branches that should have

  • 0

In our Git repository we have a few merges from branches that should have been merged with --no-ff but were not. These merges were made a long time ago.

Is there any way to force/insert a commit as if we were running those old merges with the --no-ff argument?

One of the supers on the project enjoys GitHub’s network view and wanted to be able to see the individual branches, which are all merged into one line when a fast-forward occurs.

  • 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-09T04:37:11+00:00Added an answer on June 9, 2026 at 4:37 am

    If you don’t mind having a new main/master branch (or overwriting the old one – but remember, rewriting published history is BAD), you could simply re-create the merges, if you still remember, when they were/should have been made:

    1. Checkout the first forgotten/inexistent/missed merge:

      git checkout -b new_master $commit_before_merge
      
    2. Merge the old commits. If you want proper merge messages (including the original branch name), you might want to re-create the old branch temporarily, or edit the message by hand.

      git merge $head_commit_of_old_branch
      
    3. You would then have to use cherry-pick or rebase to copy commits from the original master branch over to the new “mergy” branch. (cherry-pick with commit ranges requires a recent release of Git)

      git cherry-pick $commit_before_merge..$commit_before_next_merge
      
    4. Go back to step 2 and repeat until you are happy with history.

    NB. have backups and test in a local clone first.

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

Sidebar

Related Questions

I have two branches in my Git repository: master seotweaks (created originally from master
I have a git repository and two branches master and st (branched from master
We have a file that we need to be tracked in our Git repository.
I pushed some changes to our central git repository, and then immediately realized that
Our git development workflow is that topic branches are continuously rebased on the latest
I have been trying to setup git for our web development team unsuccessfully. Some
I have a Hudson server, and a git repository, both running on our server
I have a git repository set up that looks something like this: PROD /
We have a function in our code which isn't being called, but should be.
In our git-svn managed project, we have 3 upstream projects that are all kept

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.