Replies: 4 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.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
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