Skip to content
Discussion options

You must be logged in to vote

Hi @JeongwonKim-kr ,

Don't panic — Git records almost everything, and even if files are gone from your working directory, they're likely still in Git history somewhere. A few recovery steps in order:

First, check your reflog — this shows every HEAD movement Git made, including rebases and resets:

git reflog

You'll see a list of commits/operations with timestamps. Find the one right before things went wrong. If you see something like rebase: continuing or reset, that's likely where your files went. Note the commit hash (e.g., abc1234).

Reset to the commit before the problem:

git reset --hard abc1234

This restores your working directory to that point. If this gets your files back, you're do…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@JeongwonKim-kr
Comment options

@nirav-gajera
Comment options

Answer selected by JeongwonKim-kr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GitHub or a GitHub feature is not working as intended Repositories The core of version-controlled code storage Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates
2 participants