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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:31:57+00:00 2026-05-31T06:31:57+00:00

I recently had to perform a hard reboot and I am now receiving an

  • 0

I recently had to perform a hard reboot and I am now receiving an error in git when I try to access a specific branch (this does not happen when accessing other branches):

$git checkout branchName
fatal: failed to read object ebca165c3ec7ecd7124f41983dd264e4e1dc0125: Invalid argument

The problem is similar to the one described here: How to restore a corrupted git repository?, but differs in the fact that I am not currently on that branch to perform git status. Also, if I call git reflog I receive the same error message.

I tried to delete the branch in question using git branch -d branchName and git branch -D branchName, but have had no success.

Obviously, I would love to keep all of the branches and data, but if the solution is to delete that specific branch, then that is fine. Also, don’t know if this helps or even matters, but the last action performed on this branch was rebase.

Would a possible solution be to reconstruct the current ref from each of the individual branches that exist, excluding the invalid branch?

As a side note, I don’t have a remote source that I’m comfortable cloneing from at this point, so any local solutions are desired. Also, I’m using PHP in case that matters for any reason.

Thanks.


Edit:

Running git fsck --full I receive the following message:

$git fsck --full
fatal: failed to read object 687f624bd239de165307d18a8904a77adb32c8a1: Invalid argument

…which is odd because it seems to refer to a different hash.

  • 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-31T06:31:59+00:00Added an answer on May 31, 2026 at 6:31 am

    I finally found out how to answer this question…

    Simply go into the folder .git and delete refs/heads/BadBranch

    This allows the rest of the branches to work as they normally should, while only losing information from the corrupted branch.

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

Sidebar

Related Questions

I recently had a similar thread about this, but now I need to animate
I recently had a hard drive crashed and lost all of my source code.
I recently had to perform some string replacements in .net and found myself developing
I recently had a situation where I merged changes from a feature branch into
I recently had to take a quick look at Adobe InDesign server. In this
I recently had my free application published in Mac Appstore. I'm trying to find
I recently had cause to look at the documentation for the -XX:MaxPermSize argument to
I recently had a discussion with a colleague about serialization of byte data over
I recently had an idea to create my own String class to make using
I recently had the task of adding a barcode onto a SSRS report without

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.