DEV Community

Emergency Guide: Repairing Git Repositories After a Power Outage (opens in new tab)

Discussed on DEV

Power outages, system crashes, or forced shutdowns during active Git operations (like committing, pulling, or pushing) often result in corrupted metadata files. This happens because the file-writing process is abruptly cut off mid-stream, leaving files blank, filled with null bytes, or locked. 🚨 Common Error Symptoms warning: ignoring broken ref refs/heads/main fatal: cannot lock ref 'HEAD': unable to resolve reference... error: bad signature 0x00000000 / fatal: index file corrupt 🛠️ Step-by-...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help