it had a existing git checkout and had made some modifications, then i checked out the same repo and it overwrote the folder. Is there some way to get the old repos with the uncommitted changes?
I had checked ” git reflog –all ” but it only gave me the most recent checkout.
EDIT: cannot reproduce the issue. so guessing i made a mistake somewhere
That would happen with a
git checkout -f(
--force: When switching branches, proceed even if the index or the working tree differs from HEAD. This is used to throw away local changes)But it shouldn’ be the case with a
git cloneon the same repo:If you did a
git checkout -f, any changes added or private (not yet added) will be lost.