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

  • Home
  • SEARCH
  • 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 6915199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:26:43+00:00 2026-05-27T09:26:43+00:00

I know that i must study git more thoroughly, it seems very interesting anyway,

  • 0

I know that i must study git more thoroughly, it seems very interesting anyway, but i currently have a problem. I have a master repository and a branch one that represents a specific feature of my software.

I would normally change the master repository and just merge the changes to the feature one and only make changes to the feature one, if i just wanted to add something to that feature.

However, i accidentally made some changes, that had to be made on the master branch, to the feature one. Well, ok, it was just a few changes up to that time, so i merged the featured branch to the master(probably a very bad decision) and just changed the master to reflect the previous state.

This meant that i had to delete and change files that were previously ONLY on the featured branch. Now, this worked, but has a problem. The master branch now has a history of that files and when i try to merge the master changes to the feature, it actually removes needed nodes(because of my previous error merge).

Any ideas on how this can be resolved ?

P.S. In simpler words, i would like to merge master to my feature branch so that they are synced, but i actually don’t want to see those changed on my featured branch.

  • 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-27T09:26:44+00:00Added an answer on May 27, 2026 at 9:26 am

    If I understand, you want to merge master to your feature branch so that it appears merged in the history), but not change any of the content of your feature branch.

    To do this, use the ours merge strategy:

    git merge -s ours master
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that there must be some differences. I have a Silverlight component (
I know that in Lisp a list must end with nil, but expression like
I have to write an architecture case study but there are some things that
I know that this must be quite a basic use case, but I don't
I know that there must be a really simple solution to the below problem
I know that GUI code in Java Swing must be put inside SwingUtilities.invokeAndWait or
So I know that unit testing is a must. I get the idea that
I think there must be something subtle going on here that I don't know
I know websphere does it, so there must be something that lets apache figure
I know that |DataDirectory| will resolve to App_Data in an ASP.NET application but is

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.