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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:52:22+00:00 2026-05-21T07:52:22+00:00

I am dealing with quite a few binary files generated by a program. Auto

  • 0

I am dealing with quite a few binary files generated by a program. Auto merging doesn’t work well for these files. What I’d like to do when merging, is quite literally take one copy or the other. It’s not ideal, but I think it’s the best approach.

Now my understanding, is that if I wanted to take a file from the branch I’m merging from, and completely discard our version, I should do:

git merge <branchname>
git checkout --theirs <filename>
git add <filename>
git commit

Is this correct, or am I missing something?

I’d like to do it without using .gitignore

  • 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-21T07:52:24+00:00Added an answer on May 21, 2026 at 7:52 am

    If your goal is indeed to keep one version or the other, then yes, you will want to use:

    git checkout <--theirs|--ours> <path>
    git add <path>
    

    Of course, as you say, it’s not ideal. If there’s any way you can avoid this, you should. If you can, try to adopt workflow habits which avoid changing those files on divergent branches which will later need to be merged. If the files are generated from tracked content, you really probably do want to ignore them – if you have good reason not to, you might want to generate them from the mergeable tracked content instead, if that’s possible.

    So, explore all your other options before doing this, but if you must, you’ve got it right.

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

Sidebar

Related Questions

I'm dealing with some quite large files which are uncomfortable to upload via http,
I am currently dealing with log files with sizes approx. 5gb. I'm quite new
I am quite new to dealing with xml files through Flash and Action Script
When dealing with a single file, I'm used to: /blah do some work n
I am dealing with very primitive HTML construction that goes like this: <a NAME=header1></a><b><font
Possible Duplicate: Dealing with accuracy problems in floating-point numbers I was quite surprised why
I have (quite a bit of) static files that I need to deploy with
I've been dealing with this problem for quite some time. What I am trying
I know there are quite a few solutions for this problem but mine was
I just don't quite know how to handle this situation I'm dealing with. I

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.