Replies: 3 comments 1 reply
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Hi @devdenzel, thanks for posting in GitHub Discussions! I've gone ahead and moved this post to our In the meantime, please feel encouraged to explore existing discussions in the category and utilize the search in case other users may have run into the same issue! |
Beta Was this translation helpful? Give feedback.
-
Hi @devdenzel, try this:
git reflog
git reset --hard <commit_hash>
git checkout <branch_name>
git stash 4.1. After recovering the commit history, you can reapply the stash with: git stash pop
First, check the remote state: Second, compare the state of the remote: If the history is intact there, you can reset your local branch to match the remote:
|
Beta Was this translation helpful? Give feedback.
-
Body
Hello, good day.
Any idea on how to recover lost commit history, it all started when i mistakenly made a commit without --all first.
Went on stack overflow and everything got messed up even more my repo show just one commit.
PS on my profile i can still see a little history of that specific repo but inside the repo itself all commits are lost.
Help.
Thanks.
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions