git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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-out
for 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.

Previous: Sverre RabbelierNext: Sverre Rabbelier
Message 6 of 14 in “Teach rebase to rebase even if upstream is up to date with -f”
  1. Teach rebase to rebase even if upstream is up to date with -fSverre Rabbelier, Feb 12, 2009
  2. Johannes SchindelinFeb 12, 2009
  3. Sverre RabbelierFeb 12, 2009
  4. Johannes SchindelinFeb 12, 2009
  5. Sverre RabbelierFeb 12, 2009
  6. Junio C HamanoFeb 12, 2009
  7. Sverre RabbelierFeb 12, 2009
  8. Junio C HamanoFeb 12, 2009
  9. Sverre RabbelierFeb 12, 2009
  10. Junio C HamanoFeb 13, 2009
  11. Sverre RabbelierFeb 13, 2009
  12. Junio C HamanoFeb 13, 2009
  13. Sverre RabbelierFeb 13, 2009
  14. Junio C HamanoFeb 13, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.