Re: Trouble testing out a patch on a branch new scratch git.git repository
- From
Boyd Stephen Smith Jr. <bss@iguanasuicide.net>
- Date
- Feb 9, 2009, 22:14 UTC
- Message-ID
- <200902091615.24958.bss@iguanasuicide.net>
- In-Reply-To
- <e38bce640902091359j3f306839h9aeb699e18e420ab@mail.gmail.com>
On Monday 09 February 2009 15:59:40 Brent Goodrick wrote:
Show 16 quoted lines
> To explain what I mean: Yesterday, I had this configuration on my > bg/no-progress branch: > > A---B---C---D (bg/no-progress) > / > ----1-----2----3----4 (master) > > B C and D commits are noisy, > fix-the-white-space-and-conform-to-coding-guidelines type commits. I > want to collapse A through D into one commit called E on that branch > so that I can run git format-patch -M on the result and provide a nice > patch email. I would end up with: > > E (bg/no-progress) > / > ----1-----2----3----4 (master)
Here's my way to do that: git rebase -i $(git merge-base master bg/noprogress) bg/no-progress # Editor opens # Change "pick" -> "squash" for commits B, C, and D. # rebase runs # Maybe resolve conflicts
If you are willing to have:
E (bg/no-progress)
/
--1--2--3--4 (master)at the end, it's a little bit simpler: git rebase -i master bg/no-progress # All the rest the same.
-- Boyd Stephen Smith Jr. ,= ,-_-. =. bss@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/