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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:22:45+00:00 2026-05-13T19:22:45+00:00

I have checked out the various questions on this. The first provides a huge

  • 0

I have checked out the various questions on this. The first provides a huge question and answer (relevant? not sure) and the second provides a wrong answer as best answer.

I have a branch called great-use-this. I have another branch called master. I want to merge great-use-this into master, and avoid auto-merging conflicts.

What is the simplest and easiest way to do this?

Note: I have actually figured this out (using a third branch and ours, but this would be good to have on SO anyway.

  • 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-13T19:22:46+00:00Added an answer on May 13, 2026 at 7:22 pm

    Yes, creating a third branch and doing a merge -s ours is one solution.

    But You will find the all “let’s not advertised any “theirs” merging strategy” here.

    Between replacing your work with one other branch work, or simply getting rid of the current work and replacing it completely by the other one, Junio C. Hamano (main Git Maintainer) prefers the second approach:

    I think “-s theirs” is even worse. It is how you would discard what you did (perhaps because the other side has much better solution than your hack), but that can be much more easily and cleanly done with:

    $ git reset --hard origin/master
    

    Some people might say “But with ‘merge -s theirs‘, I can keep what I did, too”. That reset is simply discarding what I did.

    That logic also is flawed. You can instead:

    $ git branch i-was-stupid 
    $ git reset --hard origin/master
    

    if you really want to keep record of your failure.

    One big problem “-s theirs” has, compared to the above “reset to origin, discarding or setting aside the failed history” is that your ‘master’ history that your further development is based on will keep your failed crap in it forever if you did “-s theirs”.

    Hopefully you will become a better programmer over time, and you may eventually have something worth sharing with the world near the tip of your master branch. When that happens, however, you cannot offer your master branch to be pulled by the upstream, as the wider world will not be interested in your earlier mistakes at all.

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

Sidebar

Related Questions

I already have a svn read only repo checked out (svn co and not
I have checked out now a local working copy of a codebase that lives
I have checked out files from my svn repository to a local project folder.
I have checked out code from a svn repository and started making changes. But
I have a branch checked out in Tortoise 1.4.2, edited it in 1.6.2 and
I have two SVN branches checked out, b1 and b2. I would like to
I have a SVN repository and a checked out version both on a Machine
I have a folder where I keep checked-out version from Aptana Subversive SVN plugin.
I have all my Eclipse Plug-Ins checked out in one Hudson workspace. For every
I have several working copies that were checked out of old repositories. The old

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.