foxygoat / git-scripts

0 stars 1 forks source link

FF merge single commit PRs #9

Closed juliaogris closed 3 years ago

juliaogris commented 4 years ago

In order to avoid commit histories like this:

       dd2068 🌱 Merge initial httpe (#4)                           
       5497d52  Initialise httpe package                              
       c9591e1 🧹 Merge housekeeping (#3)                    
       b263a1b docs: Add godoc badge with link to README.md
       c570f18 🌱 Merge boilerplate (#1)

consider using FF merges for single commit PRs.

camh- commented 4 years ago

We should probably squash merge these as it gives the opportunity to reword the title to add the emoji and PR number. It means we could also add the diff stat at the end and the Pull-Request link. Whereas a FF merge will lose any PR information.

I will have to figure out how to do squash merges from the CLI. It may involve the github API, and at that point, maybe it makes sense to use our own hub tool that does it for us (assuming hub does not)

camh- commented 3 years ago

Done in db16598bc85d1b8f3a59e8c0d3778590401b972a - no diff stat was added as that is not needed for a single commit, but the Pull-Request trailer is added. This was initially done with hub api but since moving to gh, gh pr merge --squash does it more simply.

[Squash merging was originally done in d4ee6c5fbd67e6fad391f33cfabcb7a836c20a31 - the above mentioned PR just uses it automatically for single PR commits]