I rebased a coworkers branch that had 2 commits and squashed the second commit into the first one. It preserved the original author (i.e. not me).
Suppose I want to fix one line of code, so I reverse a hunk and make a new commit.
At this point, I'm back where I started, with two commits that I want to squash together, and want to preserve the original author. However, in the earlier case both commits had the same author. In this latter case, the commits being squashed have different authors. Which author will git assign to the new rebased/squashed commit?
As noted in the comments, when doing a 'squash', the author remains the one whose commit you are squashing into.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With