logoalt Hacker News

Show HN: Git-knife – Edit commit messages, authors, and dates like a spreadsheet

155 pointsby YonathanTesfayeyesterday at 3:09 PM99 commentsview on HN

Comments

NichoPaolucciyesterday at 4:23 PM

“It never reimplements git — it shells out to the system git CLI and rebuilds commits with git commit-tree, reusing each commit's original tree so file contents are provably never changed.”

Glad the LLM noted this - I was worried this would reimplement git

show 6 replies
lrvickyesterday at 9:06 PM

Note: This will not work and cannot work on repos that use signed commits from multiple authors.

Signed git history is immutable, and unsigned git history is a supply chain attack vector.

That said I could see this being useful for single-author WIP branches doing cleanup before a PR

Deflettertoday at 4:10 AM

This is, funnily enough, something I've been periodically searching for for nearly a decade, and even renewed my search yesterday. For those wondering, my use case is a model Parliament (context: https://news.ycombinator.com/item?id=43474850) and deciding on using git to store the laws, with the commits representing the Acts of Parliament themselves. The problem is that we need to guarantee that every commit has the correct metadata: we do not care at all about the conservation of commit hashes. And if we've accidentally missed a law and need to interactively-rebase it into the git history, it should NOT reset all the subsequent commit dates to the current timestamp. Basically, we're wanting to use git as a historical archive. I'm delighted to have found this.

beartyesterday at 8:14 PM

It looks like the screenshot was an actual photo of someone's monitor. I'm left wondering why print screen wasn't utilized. And for some reason it really makes me not want to touch this project.

show 3 replies
iamcoder18yesterday at 3:45 PM

This is cool, but has anyone ever needed to rewrite commit authors or dates?

show 10 replies
unqueuedyesterday at 6:25 PM

I appreciate that it uses git-notes and that is makes backup branches in it's own namespace. I wish it were a bit lighter though.

Haven't seen mentioned, but you might want to check out https://github.com/mystor/git-revise

mellosoulsyesterday at 3:34 PM

Hmmm, this seems to be making easy something you normally should not do.

show 3 replies
vivzkestreltoday at 4:25 AM

- make a drag and drop ui for git rebase

- i should be able to change order of commits

- i should be able to change what files went in a previous commit

show 1 reply
cautiouscatyesterday at 3:17 PM

This looks cool! Are there screenshots available?

show 1 reply
f1shyyesterday at 4:04 PM

I would like to see something like this in magit. Other there is already?

show 1 reply
sixtyjyesterday at 3:28 PM

Extra points for the name.

show 1 reply
hootzyesterday at 4:26 PM

Would be great to have this, but as a TUI tabular editor.

show 2 replies
jauntywundrkindyesterday at 6:02 PM

Two recent threads where I sing some praises of git rebase -i, specifically linking it to a spreadsheet. Awesome to see this pop up, feels serendipitous!

Git rebase -i is not that scary 119 points, 16 days ago, 151 comments https://news.ycombinator.com/item?id=49053385 https://cachebag.sh/journal/interactive-rebasing/

Staging patches with git add 34 points, 12 days ago, 52 comments https://news.ycombinator.com/item?id=49048570 https://cachebag.sh/journal/interactive-rebasing/

Really enjoying jj these days but the git rebase -i spreadsheet remains such a winner. Expanding it more, leaning in, ftw.

dhruv3006today at 4:03 AM

that's a catchy name - good luck.

YonathanTesfayeyesterday at 3:14 PM

I built a small Tauri app that just shows your commits in a table and lets you edit message/author/date directly, plus find & replace with regex if you need to fix a bunch at once. It backs up the branch before it rewrites anything doesn't touch file contents, just metadata.

show 1 reply
Kermanyesterday at 5:17 PM

[dead]