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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:41:53+00:00 2026-06-09T20:41:53+00:00

A colleague sent me a patch from his git repo. Since it’s not a

  • 0

A colleague sent me a patch from his git repo. Since it’s not a clone, his index entry contains hashes that are not known in my repo. Sample:

index 20589f5..bbdd152 100644

20589f5 exists in his repo but not in mine.

When I try to apply the patch using TortoiseMerge, I get the message

fatal: not a valid object name

How could I trick TortoiseMerge into accepting the patch?


Edit: It doesn’t have to be TortioseMerge. Any other tool that lets me apply my patch visually (and runs on Windows, preferably free) is good too.

  • 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-09T20:41:55+00:00Added an answer on June 9, 2026 at 8:41 pm

    Since it is from a colleague, the best answer is to simply have him provide the missing data, either via a patch series or by letting you fetch from his repository. If you can get this data, any other route is just a waste of time.

    Otherwise, you have have a patch that does not apply cleanly to your current work tree, and you don’t have enough information to perform a 3-way merge.

    Now, if you want to try applying the patch anyway, I suggest using git am (or git apply, if he provided a diff instead of a patch — which is bad practice) to attempt to apply the patch. You can use the --reject option to force it to be applied as much as possible. Git will create `.rej’ files for diff hunks that did not apply cleanly to your current tree. You can then go and attempt to apply these manually.

    Another option is to simply manually apply the entire patch via your editor.

    There is no need to use patch as suggested elsewhere. git apply will always be preferable.

    Now, you want to do this visually, and the best suggestion I can offer is the pseudo-visual --interactive mode of git apply. This will allow you to apply the patch hunk by hunk.

    You can’t do this with Tortoisemerge because Tortoisemerge is expecting two or three complete files in order to perform the merge. Since your index values don’t correspond to known blobs in your repository, you can’t provide the complete base file revision to Tortoisemerge.

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

Sidebar

Related Questions

I zipped a rails project from OS X and sent it to a colleague
My colleague, Ryan, came to me with a bug in his Bash script, and
My colleague has created an JAVA_HOME variable somewhere but he could not remember. I
A colleague of mine has issues with his VPN connection. It seems that his
One colleague of mine has troubles during the DllMain Detach process. His bug seems
My colleague has pushed to our git repository a mistake. I wish to commit
A colleague of mine states that booleans as method arguments are not acceptable .
A colleague recently asked me how to deep-clone a Map and I realized that
If you copy this into VS2010 it sobs and dies. Why? A colleague sent
A colleague of mine wants to use my python 2 code on his OS

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.