<div dir="ltr"><div>Note that I like to see the "messy" decomposed history where each change has a rationale attached in a separate commit message.</div><div>Of course, erratic trial and errors may benefit from a little rewrite of history, but not a squash, it's too violent for my taste, more something like a rebase -i.</div><div><br></div><div>When perigrinations are too much random, I prefer a fulll rewrite on a brand new branch with cherry-picking.<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Le jeu. 27 déc. 2018 à 16:09, akgrant <<a href="mailto:notifications@github.com">notifications@github.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Hi Ben,<br>
<br>
On Mon, 17 Dec 2018 at 15:55, Ben Coman <<a href="mailto:notifications@github.com" target="_blank">notifications@github.com</a>> wrote:<br>
><br>
> To provide cleaner PRs, I tend to "git commit --amend" to my-branch that I<br>
> issued a PR from and force push that to my github account.<br>
> In spite of the general advice not to force push public branches, in<br>
> reality it seems people rarely branch except from the canonical account.<br>
> Actually this could be covered by a convention like...<br>
> "if you branch from someone's personal account, immediately push it to<br>
> your account so it shows up in the network view."<br>
> Forcing pushing only a problem if someone has branched from it the network<br>
> view could be checked before forcing pushing.<br>
<br>
Just as an alternative:<br>
<br>
Instead of amending the commits, sometimes I double branch and squash<br>
the merges back, e.g. (from memory):<br>
<br>
$ git checkout Cog<br>
$ git checkout -b IssueBranch<br>
$ git checkout -b IssueBranchDev<br>
<br>
Lots of little commits, backtracks, etc. while solving the problem.<br>
<br>
$ git checkout IssueBranch<br>
$ git merge --squash IssueBranchDev<br>
$ git push<br>
<br>
and then create the PR.<br>
<br>
The advantage is that I still have the messy history available in<br>
IssueBranchDev while I'm doing the development.<br>
<br>
Cheers,<br>
Alistair<br>


<p style="font-size:small;color:rgb(102,102,102)">—<br>You are receiving this because you are subscribed to this thread.<br>Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/f6445ab9ea75f685e4e53bff8917449646c3754b#commitcomment-31789305" target="_blank">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AhLyW40hCYbg0EQqyhHWytu6-7WlDtxIks5u9OKRgaJpZM4ZVgm6" target="_blank">mute the thread</a>.<img src="https://github.com/notifications/beacon/AhLyW_cMP_HL1C6YmYTEl5_jW0grZXphks5u9OKRgaJpZM4ZVgm6.gif" alt="" width="1" height="1"></p>

</blockquote></div>