So GitHub has the ability to merge+squash commits for a PR.
We follow the process of PR'ing code from dev
-> master
.
Previously, I've been just 'merging' the PR's but that generates a new commit which says: "Merge Pull Request #1 from foo/bar
". :( Boooo...
So I thought I might try the new Squash Commits
thingy with GH. This created a new commit with all my previous commits squashed. Ok, so far so good.
I then went back to my dev
branch (on my developer machine) .. pulled down upstream/master
(which was where the PR and squash-merge happened)) and it now added another commit to my local history! It didn't go "Oh .. wow. you're waaay out of line .. lets sync up". It just did a merge.
So the Squash+Merge button squashed 4 commits and replaced it with 1 ...
the pull upstream/master
on my localhost machine now has my 4 commits still there AND the Squashed-commit the PR did AND a new commit which is "Merge branch master .. blah ... noise ..spam
" commit :( :( :(
Is there a special trick/workflow I should be doing after a merge-squash has occurred .. to make sure my dev
branch is properly sync'd? Like .. does everyone just delete their localhost dev
branch before they do a pull upstream/master
back down to their localhost and into a (newly created) dev
branch?
Remember: the goal here is to avoid those crappy "Merge Pull Request #2.." merge bubble messages.
Or are people just doing this via the CLI for the time being until GitHub learns how to do this :(
git log
or UI shows history with merges, then you should fix that. For example using option--first-parent
– Alenaalene