4 ms·
I don't think that 'git undo' can tell with certainty which entries in the reflog are from it. It would be a crude heuristic that's going to break.
by dan00 10y ago
I don't think that 'git undo' can tell with certainty which entries in the reflog are from it.
It would be a crude heuristic that's going to break.
- m_mueller 10y agoIs there maybe a way to annotate the commit message of HEAD without influencing the reflog?
- dan00 10y agoYou 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.
- m_mueller 10y agoI get that, I just wondered whether it's technically possible (with supported git operations, not hacking down at FS / byte level).
- Dylan16807 10y agoIf 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.
- kasabali 10y agowell, there is git-notes(1), but I'm not sure how it can be used as a journal for reflog operations.