Re: [RFC PATCH] Teach rebase to rebase even if upstream is up to date with -f
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 12, 2009, 21:34 UTC
- Message-ID
- <7vbpt7jq4c.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <1234468061-29923-1-git-send-email-srabbelier@gmail.com>
Sverre Rabbelier <srabbelier@gmail.com> writes:
Show 13 quoted lines
> Say I have a bunch of new commits ready to submit to origin, but I want to fix > some whitespace damage, I could do something like this: > > $ git checkout master > $ git branch -b rebase-me > $ git reset --hard origin/master > $ git commit --allow-empty "force rebase" > $ git checkout rebase-me > $ git rebase --whitespace=fix master > $ git rebase -i master # kick out the 'force rebase' commit > $ git checkout master > $ git reset --hard rebase-me > $ git branch -d rebase-me
For that, I would prefer to see:
git format-patch --stdout origin >my.mbox
git fetch origin
git checkout origin ;# yes, detach
git am --whitespace=fix my.mbox
make test
git format-patch -o to-send-out origin
git send-email ..options.. to-send-outfor two reasons.
It fixes whitespace breakages, but more importantly, the procedure makes sure that what you will be sending out will apply cleanly to the origin that may have progressed since you last looked at it.