Reputation: 3909
git is telling me all 300 files that I've been adding/staging/committing all along are now new.
The latest unstaged modified and deleted files were correct, I did a
git add .
git add . -A
but neither resolved the 300 new files it still sees.
kinda strange, like my repo has been destroyed or corrupted. I had a fair amount of changes since last staging and commit, and as I said it saw these as modified or deleted.
ETA:
git status is showing (after I did my above commands)
[(master) +300 ~0 -0]>
Upvotes: 3
Views: 82
Reputation: 768
I had a scenario where I changed the permissions for the project's directory and all files.
After that, it showed that every file is a new one.
So I git stash
my "changes" and went on.
Or you can commit the changes as well.
Hope this helps someone with my case.
Cheers.
Upvotes: 0
Reputation: 1323793
One way to recover would be to:
.git
subdirectory) of the corrupted repo over the newly cloned and checked out working tree.Upvotes: 1