3

I have a few non-consecutive commits on the master branch that I'd like to flatten into one commit. How do I squash a, b, and c if I have the following commits?

a-b-x-y-c

(a is the newest commit)

The expected result would be:

D-x-y

(D is the squash of a, b, and c). Is this even possible?

  • The result will be `D-x-y'` because you're removing `c`. Is this work you haven't yet pushed, *i.e.*, where rewriting history won't cause problems? – Greg Bacon Dec 27 '11 at 17:54

1 Answers1

-2

Sure, check out git interactive rebasing.

toddsundsted
  • 6,225
  • 2
  • 21
  • 13