Let’s suppose I need to perform some average-length (several days) refactoring.
I create “mybranch” from master, do the work, sometimes I perform merges from master to mybranch (some other team members supposed to continue the work, and probably I’ll need to get their changes). And after a while I’m ready to merge my changes back to master.
Will I be able to squash only my changes (excluding the changesets with merges from master, since they aren’t mine) and cherry-pick a single result commit of my works into the master? Is it a possible to do scenario?
Yep. You can confirm it with a small test repository. Just do:
and choose
squashfor all the lines except the first. Then you just checkoutmasterand do a regular fast-forward merge ofmybranch.