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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:21:55+00:00 2026-06-10T05:21:55+00:00

I have a master branch that was branched from by another dev, who then

  • 0

I have a master branch that was branched from by another dev, who then added features. In the meantime, I have made changes to some of the same files. While there is no direct conflict on lines, I am wondering about the different methods to use to merge the other branch back into master, with minimal conflicts.

ASCII art visualisation:

A-B-C-D
\
 1-2-3

Am I best off checking out commit A, merging the branch at 3 back in, then reapplying the changes in B through D? Or should I just merge 3 back into D? Or I am sure there’s some better way that I am missing.

I am fairly new to git, I think I am getting the hang of it, but I just want to make sure I am using it properly.

  • 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-10T05:21:57+00:00Added an answer on June 10, 2026 at 5:21 am

    What you describe—checking out A, merging in 1–3, then applying B–D—is a standard Git technique called rebasing. Assuming there are no conflicts that can’t be automatically resolved, you can do it with a single command:

    git rebase --onto {commit 3} {commit A} {commit D}
    

    If there are conflicts when doing a rebase, Git will talk you through resolving them.

    However, the normal Git workflow is to just merge the branches together. Unless you’ve some reason not to, I’d advocate just doing the merge.

    Merging more accurately reflects the development process; it means you can look at your history and see exactly how a feature was developed then merged into the main code. Rebasing makes your history look artificially clean; sometimes that’s useful, but it does hide how things were done.

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

Sidebar

Related Questions

I'm using git. I have a branch, apifixes , that was branched from master
I have a local branch A that's branched from origin/master that I frequently rebase,
Pretend I branched from my master branch to a topic branch, and then I
I have a master branch in my project, that I use to pull changes
I have a 'master' branch and several topic branches. Assume that the master branch
I have a git branch that is based off an old master. This branch
I have master branch of the project. Then I want to add a new
So I created a new branch from master and eventually merge the changes back,
I have two branches: master and dev I want to create a "feature branch"
I have a repo that I have a master branch which will end up

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.