Hi Ben,<br>
<br>
On Mon, 17 Dec 2018 at 15:55, Ben Coman <notifications@github.com> 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;-webkit-text-size-adjust:none;color:#666;">—<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">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AhLyW40hCYbg0EQqyhHWytu6-7WlDtxIks5u9OKRgaJpZM4ZVgm6">mute the thread</a>.<img src="https://github.com/notifications/beacon/AhLyW_cMP_HL1C6YmYTEl5_jW0grZXphks5u9OKRgaJpZM4ZVgm6.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@akgrant on f6445ab: Hi Ben,\n\nOn Mon, 17 Dec 2018 at 15:55, Ben Coman \u003cnotifications@github.com\u003e wrote:\n\u003e\n\u003e To provide cleaner PRs, I tend to \"git commit --amend\" to my-branch that I\n\u003e issued a PR from and force push that to my github account.\n\u003e In spite of the general advice not to force push public branches, in\n\u003e reality it seems people rarely branch except from the canonical account.\n\u003e Actually this could be covered by a convention like...\n\u003e \"if you branch from someone's personal account, immediately push it to\n\u003e your account so it shows up in the network view.\"\n\u003e Forcing pushing only a problem if someone has branched from it the network\n\u003e view could be checked before forcing pushing.\n\nJust as an alternative:\n\nInstead of amending the commits, sometimes I double branch and squash\nthe merges back, e.g. (from memory):\n\n$ git checkout Cog\n$ git checkout -b IssueBranch\n$ git checkout -b IssueBranchDev\n\nLots of little commits, backtracks, etc. while solving the problem.\n\n$ git checkout IssueBranch\n$ git merge --squash IssueBranchDev\n$ git push\n\nand then create the PR.\n\nThe advantage is that I still have the messy history available in\nIssueBranchDev while I'm doing the development.\n\nCheers,\nAlistair\n"}],"action":{"name":"View Commit","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/f6445ab9ea75f685e4e53bff8917449646c3754b#commitcomment-31789305"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/f6445ab9ea75f685e4e53bff8917449646c3754b#commitcomment-31789305",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/f6445ab9ea75f685e4e53bff8917449646c3754b#commitcomment-31789305",
"name": "View Commit"
},
"description": "View this Commit on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>