Something I’d love to see edited into this is you can specify any commitish when interactively rebasing. When I’m squashing I almost always use git rebase -i origin/master. This way, you automatically get the right number of commits.
Born in 1979, engineer, doctorate in 2008, I've started my working activity both as a researcher and as a freelance in the industrial automation field.
I declare the rebase point only if it has not been pushed yet. E.g. when I rebase only the last half of my local commits. Otherwise I keep it implicit.
Something I’d love to see edited into this is you can specify any commitish when interactively rebasing. When I’m squashing I almost always use
git rebase -i origin/master
. This way, you automatically get the right number of commits.I declare the rebase point only if it has not been pushed yet. E.g. when I rebase only the last half of my local commits. Otherwise I keep it implicit.
Hi Christopher
That's a good point. But careful if your branch doesn't originate from master :-)
Fair point. I’ve been practicing trunk based development for quite some time now.