Hacker News new | ask | show | jobs
by m_mueller 3588 days ago
Is there maybe a way to annotate the commit message of HEAD without influencing the reflog?
1 comments

You can't change the commit message of a commit without changing the commit, which in most cases is a bad idea, if you don't know pretty much exactly what your doing.

Replacing one heuristic with another won't make this a stable operation.

A lot of people had already the idea to encode relevant information inside of documentation and it was always a bad idea in the long run.

I get that, I just wondered whether it's technically possible (with supported git operations, not hacking down at FS / byte level).
If you want to undo without reflog entries, just snip the most recent line off the reflog.

If you want to put annotations on commits, use tags with message bodies.

So yes, there are ways to accomplish what you want.

well, there is git-notes(1), but I'm not sure how it can be used as a journal for reflog operations.