Home / Blog / Post
Quick Fix For Git Corrupt Index
Added on 09th November 2017 in Tutorial

While running GIT inside Bash on Ubuntu on Windows (Windows Subsystem For Linux), I ran git status and gt the following error.

[email protected]:~/Projects/MBM-CRM$ git status
error: bad signature
fatal: index file corrupt

At first I thought this would be a pain to fix, admitadly I could just reclone the repository, but I found this way to be quicker and cleaner.

Firstly, Remove the Offending Index

rm -f .git/index

Then reset the current working version to match the repository

git reset

This is a quick fix, if it does not work in your circumstance then I would advise just git cloning from fresh.

Hi there, I am christopher shaw, a software developer form South Yorkshire, England.

I love tinkering with all things tech, and opened this website as a web presence for myself and a place to keep my notes and snippets. Hopefully you will find something here to help

Christopher Shaw