3 ms·
But you can go back and change a commit message with ammend? Or are you wanting to change other people's? https://www.atlassian.com/git/tutorials/rewriting-his
by philbarr 7y ago
But you can go back and change a commit message with ammend? Or are you wanting to change other people's?
https://www.atlassian.com/git/tutorials/rewriting-history#git-commit--amend https://www.atlassian.com/git/tutorials/rewriting-history#gi...
- bhaak 7y agoLook at the URL: "rewriting-history" Ammending changes the hash of the commit. That doesn't matter if you haven't pushed it yet but if you have, you can't push the change upstream without force-pushing. And if I want to change a commit message further back in history (regardless of my own or of somebody else), it would branch off at that point from the upstream git history. What I want is that you could put multiple comments onto the same commit with different timestamps. Like git versions files, it should also allow to version commit messages.
- chucky 7y agoYou can accomplish something like this by using git-notes (https://git-scm.com/docs/git-notes https://git-scm.com/docs/git-notes). You'd have to have your own tooling to read/write these in a convenient way of course.
- bhaak 7y agoYes but they are just a patch over the missing functionality. The key point is "your own tooling". Git has a great tool universe but unfortunately you immediately lose many tools if you go beyond what the core offers.
- wyoung2 7y ago> Ammending changes the hash of the commit Not necessarily. Fossil's `amend` command works by adding additional information to the repo that the web UI and commands like `fossil info` look at when building up information intended for direct consumption by the user. In this way, you can edit commit messages, rename branches/tags, add/remove tags, etc. to historical check-ins without breaking the blockchain / Merkle tree of commits. This allows Fossil to keep all of the historical information about what happened to a given file, commit, ticket, etc. while still allowing a coherent presentation of the current state of affairs to the user.