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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:18:55+00:00 2026-05-31T18:18:55+00:00

I have three branches (let’s call them master, testing, and feature). All three are

  • 0

I have three branches (let’s call them master, testing, and feature). All three are shared, so I cannot rebase any of them without causing problems for others. Currently, all three branches have diverged (none is a fast-forward), so eventually some merging will need to done, since rebasing is not an option.

For the moment, though, I would like to pull in the Makefile from testing into feature, since feature was split off from master, and the Makefile was added in testing. I do not want to merge in any other changes between the two branches, however.

My understanding is that if I just git-add Makefile to feature, this will cause merge conflicts when I merge feature back into testing (and then master), especially if I make any further additions to the Makefile in my feature branch.

I could do git-cherry-pick; however, there were multiple commits to the Makefile in testing, and I assume there’s a better way than trying to cherry-pick all of those commits into feature.

  • 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-31T18:18:56+00:00Added an answer on May 31, 2026 at 6:18 pm

    You can just do a

    git checkout branch_name <path(s)>

    This can load a specific file but you can also use wildcards and directories

    Note that:

    • Paths are relative
    • The path makes that git does not switch branches, so you can just commit after gettihg the file
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say you have two public feature branches, feature1 and feature2 . The workflow
Let's say you have a table for branches in your organization. Some of them
Here's the situation, I have three branches, master , fix#1 and fix#2 , where
I have a git repo which has a few branches - there's the master
Let's say I have a list of branches, how to find a list of
I have a typical Subversion set-up: /trunk /branches/client-one /branches/client-two /branches/client-three Trunk holds main development
Let's say I have anonymous branches AA and BB. In branch AA there is
The question is straightforward: I have three heads (branches in this case), and I
There is group of people [let's say 1874 of them], all representing different companies
Let's say I have huge tree view and one the branches is in variable

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.