My solution for a similar situation was to replace a hash of the damaged object in .git/refs/heads/my-working-branch
with a hash of previous commit (which can be found in .git/logs/HEAD
).
More Related Contents:
- How to resolve “Error: bad index – Fatal: index file corrupt” when using Git
- How to recover Git objects damaged by hard disk failure?
- GIT commit as different user without email / or only email
- Changing the Git user inside Visual Studio Code
- Set git config values for all child folders
- How does git log –since count?
- Using IntelliJ to amend git commit message
- How can I move all git content one-level up in the folder hierarchy?
- How do I make git merge’s default be –no-ff –no-commit?
- How to push changes to github after jenkins build completes?
- Refname ‘master’ is ambiguous
- Git gives me a “Permission Denied” error when writing files that I am pulling
- Git changes my file permissions upon checkout
- Is there a way to compare two diffs or patches?
- How to temporarily disable git http proxy
- Clone only the .git directory of a git repo
- Git – head (lowercase) vs HEAD (uppercase)
- Why do excluded files keep reappearing in my git sparse checkout?
- Why has git-filter-branch not rewritten tags?
- How can I prevent non-fastforward pushes to selected branch(es) in git?
- PowerShell Capture Git Output
- How to quit (not abort) a Git merge in progress keeping the changes uncommitted?
- How to push different local Git branches to Heroku/master
- SSH Agent Forwarding with Ansible
- git – remote add origin vs remote set-url origin
- git clone with HTTPS or SSH remote?
- How do I move forward and backward between commits in git?
- Commit empty folder structure (with git) [duplicate]
- when you have secret key in your project, how can pushing to GitHub be possible?
- Other consequences of `git push –force`?