I had directories and files that I created since a specific commit, and found out that they weren't pushed to my repo for some reason.
I commit
ted everything in my code base with -a
and push
ed it. Then I got an error once that said that my local branch is behind the remote branch for some reason, so I push -f
-ed it.
Now all my new files are gone and my local codebase has reverted, and I don't have any clue why. I didn't pull anything from the server. I did use diff
once, but just to view the changes between a local branch and a remote branch.
I'm sure that somewhere a past snapshot of my codebase is saved somehow in the refs.
How can I check if it is, and if it is, how can I revert it?
Edit: the issue I have does not require to revert to previous HEAD locations as there was a problem with a few previous commits themselves. Please remove the "duplicate" tagging.
Update: I think that I found that those untracked files were saved as either dangling blobs or unreachable objects. I'm currently checking this direction.