79716760

Date: 2025-07-27 23:42:34
Score: 1
Natty:
Report link

git filter-branch is a very powerfull command that leads to a lot of pitfalls if is not used correctly. One of those pitfalls is that it you can easily rewrite your git history, as in your case.

Can you recreate the original git history?

What you can maybe do to recover your original history is:

  1. Use git reflog to find an old commit before the rewrite and then reset with git reset --hard <commit>.

  2. Check for backup refs: git log refs/original/refs/heas/main.

For more information you can read these links:
https://git-scm.com/docs/git-filter-branch
https://www.atlassian.com/git/tutorials/refs-and-the-reflog

Reasons:
  • Blacklisted phrase (1): these links
  • Whitelisted phrase (-1): in your case
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): is a
  • Low reputation (1):
Posted by: ramsingh