git rebase -i -- why is it changing commit hashes? : <p>So I'm more or less familiar with how rebasing works, but up until recently I usually just did a <code>git rebase -i HEAD~20</code>, and modified whatever needed to be modified.</p>

<p>I was surprised to learn that this will modify the hashes of all 20 commits, even if the only action I take is to squash the last two.</p>

<p>I'm not sure what causes the hash change for the other 18 commits though, since neither their parents, neither their contents change... Or does it? Maybe a timestamp?</p>

<p>Also is there a way to prevent that?</p>
