git - Squash commits directly on feature without rebase or merge -
i've been reading little --squash
ing commits, seem go hand in hand --rebase
.
i have feature branch set of commits this:
(feature) --> b --> c --> d --> e --> f --> g / (master) m1 --> m2 --> m3
suppose want merge master
branch, want clean commits on feature first.
is possible to:
- pick commit b, e , f , squash them 1 commit?
or
- can squash commits come in order, squash: (a, b , c), or squash (d, e , f) etc?
either way, can squash directly on feature, without immidiately initializing merge
or rebase
it?
if so, how can git?
yes , no.
yes, can avoid changing parent of commit 'a' believe can't avoid git rebase
. can interactive rebase on same root:
git rebase -i m2 feature
then can whatever want , @ end branch feature
still start commit m2.
Comments
Post a Comment