I accidentally deleted .git/index
, is there a way to recover it? It's permanently deleted. I haven't committed anything yet.
To rebuild the index file, you can try these two commands:
git reset # re-scan the working directory
git add -u # update the index