[GH-ISSUE #12] Error rewriting history: Command failed: git filter-branch -f --msg-filter 'node .git\filter-msg.js' HEAD #8

Closed
opened 2026-02-27 19:20:53 +03:00 by kerem · 4 comments
Owner

Originally created by @selfagency on GitHub (Nov 13, 2025).
Original GitHub issue: https://github.com/f/git-rewrite-commits/issues/12

Well that was a big waste of time and money

📊 Summary:
  • Total commits analyzed: 691
  • Well-formed commits (skipped): 0
  • Commits improved: 691
  • Commits to be rewritten: 691

Do you want to apply the new commit messages? (y/n): y

🔄 Rewriting git history...
fatal: invalid object name 'C'.

❌ Error rewriting history: Command failed: git filter-branch -f --msg-filter 'node C:\Users\dsieradski\Dev\supplies-web\.git\filter-msg.js' HEAD
Command failed: git filter-branch -f --msg-filter 'node C:\Users\dsieradski\Dev\supplies-web\.git\filter-msg.js' HEAD
fatal: invalid object name 'C'.

You can restore from backup: git reset --hard backup-main-1763049133887

❌ Error: Command failed: git filter-branch -f --msg-filter 'node C:\Users\dsieradski\Dev\supplies-web\.git\filter-msg.js' HEAD
Command failed: git filter-branch -f --msg-filter 'node C:\Users\dsieradski\Dev\supplies-web\.git\filter-msg.js' HEAD
fatal: invalid object name 'C'.
Originally created by @selfagency on GitHub (Nov 13, 2025). Original GitHub issue: https://github.com/f/git-rewrite-commits/issues/12 Well that was a big waste of time and money ``` 📊 Summary: • Total commits analyzed: 691 • Well-formed commits (skipped): 0 • Commits improved: 691 • Commits to be rewritten: 691 Do you want to apply the new commit messages? (y/n): y 🔄 Rewriting git history... fatal: invalid object name 'C'. ❌ Error rewriting history: Command failed: git filter-branch -f --msg-filter 'node C:\Users\dsieradski\Dev\supplies-web\.git\filter-msg.js' HEAD Command failed: git filter-branch -f --msg-filter 'node C:\Users\dsieradski\Dev\supplies-web\.git\filter-msg.js' HEAD fatal: invalid object name 'C'. You can restore from backup: git reset --hard backup-main-1763049133887 ❌ Error: Command failed: git filter-branch -f --msg-filter 'node C:\Users\dsieradski\Dev\supplies-web\.git\filter-msg.js' HEAD Command failed: git filter-branch -f --msg-filter 'node C:\Users\dsieradski\Dev\supplies-web\.git\filter-msg.js' HEAD fatal: invalid object name 'C'. ```
kerem closed this issue 2026-02-27 19:20:53 +03:00
Author
Owner

@selfagency commented on GitHub (Nov 13, 2025):

That was on Windows. This is on Mac.

📊 Summary:
  • Total commits analyzed: 394
  • Well-formed commits (skipped): 1
  • Commits improved: 393
  • Commits to be rewritten: 393

Do you want to apply the new commit messages? (y/n): y

🔄 Rewriting git history...
/opt/homebrew/opt/git/libexec/git-core/git-filter-branch: line 471: node: command not found
msg filter failed: node /Users/daniel/Developer/opencommunities/.git/filter-msg.js

❌ Error rewriting history: Command failed: git filter-branch -f --msg-filter 'node /Users/daniel/Developer/opencommunities/.git/filter-msg.js' HEAD
Command failed: git filter-branch -f --msg-filter 'node /Users/daniel/Developer/opencommunities/.git/filter-msg.js' HEAD
/opt/homebrew/opt/git/libexec/git-core/git-filter-branch: line 471: node: command not found
msg filter failed: node /Users/daniel/Developer/opencommunities/.git/filter-msg.js

You can restore from backup: git reset --hard backup-main-1763050404256

❌ Error: Command failed: git filter-branch -f --msg-filter 'node /Users/daniel/Developer/opencommunities/.git/filter-msg.js' HEAD
Command failed: git filter-branch -f --msg-filter 'node /Users/daniel/Developer/opencommunities/.git/filter-msg.js' HEAD
/opt/homebrew/opt/git/libexec/git-core/git-filter-branch: line 471: node: command not found
msg filter failed: node /Users/daniel/Developer/opencommunities/.git/filter-msg.js
<!-- gh-comment-id:3528603454 --> @selfagency commented on GitHub (Nov 13, 2025): That was on Windows. This is on Mac. ``` 📊 Summary: • Total commits analyzed: 394 • Well-formed commits (skipped): 1 • Commits improved: 393 • Commits to be rewritten: 393 Do you want to apply the new commit messages? (y/n): y 🔄 Rewriting git history... /opt/homebrew/opt/git/libexec/git-core/git-filter-branch: line 471: node: command not found msg filter failed: node /Users/daniel/Developer/opencommunities/.git/filter-msg.js ❌ Error rewriting history: Command failed: git filter-branch -f --msg-filter 'node /Users/daniel/Developer/opencommunities/.git/filter-msg.js' HEAD Command failed: git filter-branch -f --msg-filter 'node /Users/daniel/Developer/opencommunities/.git/filter-msg.js' HEAD /opt/homebrew/opt/git/libexec/git-core/git-filter-branch: line 471: node: command not found msg filter failed: node /Users/daniel/Developer/opencommunities/.git/filter-msg.js You can restore from backup: git reset --hard backup-main-1763050404256 ❌ Error: Command failed: git filter-branch -f --msg-filter 'node /Users/daniel/Developer/opencommunities/.git/filter-msg.js' HEAD Command failed: git filter-branch -f --msg-filter 'node /Users/daniel/Developer/opencommunities/.git/filter-msg.js' HEAD /opt/homebrew/opt/git/libexec/git-core/git-filter-branch: line 471: node: command not found msg filter failed: node /Users/daniel/Developer/opencommunities/.git/filter-msg.js ```
Author
Owner

@bijanGh commented on GitHub (Nov 14, 2025):

me too, on windows , tried wsl and bash but the same error

<!-- gh-comment-id:3531873464 --> @bijanGh commented on GitHub (Nov 14, 2025): me too, on windows , tried wsl and bash but the same error
Author
Owner

@willtheorangeguy commented on GitHub (Nov 14, 2025):

Should be fixed in #15. @selfagency do you think you could test the changes on Mac?

<!-- gh-comment-id:3534980793 --> @willtheorangeguy commented on GitHub (Nov 14, 2025): Should be fixed in #15. @selfagency do you think you could test the changes on Mac?
Author
Owner

@f commented on GitHub (Nov 15, 2025):

Just released a new version fixes it.

<!-- gh-comment-id:3535387281 --> @f commented on GitHub (Nov 15, 2025): Just released a new version fixes it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-rewrite-commits#8
No description provided.