Thread with 8 posts

jump to expanded post

a thing that really irks me about git: the “author date” in commits. imho, if you make non-trivial changes to a commit when amending it, you should update that date; and if you squash several commits together, you should use the date of the latest one. neither is the default…

Open thread at this post

git commit --amend defaults to not changing the author date. that’s reasonable for minor changes, but in an environment where people work with commits rather than branches (e.g. Gerrit), this means commit dates that are days, weeks or months earlier than most of the changes…

Open thread at this post

you can use --reset-author when editing a commit, but not many people seem to know of that.

meanwhile using git merge --squash to do a squash merge of someone else’s work makes you the author now, and makes the date the current time. I don’t like that either.

Open thread at this post

for amending, I feel like changing the default behaviour is never going to happen. on the other hand, maybe I’ll eventually submit a patch to git to add an alternative squash mode…

in the meantime, I am using a very particular, manual process for all my git merges.

Open thread at this post