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

Re: [PATCH] Teach 'git pull' the '--rebase' option

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 25, 2007, 23:54 UTC
Message-ID
<7v3avy21il.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<Pine.LNX.4.64.0710260007450.4362@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 26 quoted lines
> On Thu, 25 Oct 2007, Linus Torvalds wrote:
>
>> On Thu, 25 Oct 2007, Johannes Schindelin wrote:
>> > 
>> > This behavior is more desirable than fetch + pull when a topic branch
>> > is ready to be submitted.
>> 
>> I'd like there to be some *big*warning* about how this destroys history 
>> and how you must not do this if you expose your history anywhere else.
>> 
>> I think it's a perfectly fine history, but if you have already pushed out 
>> your history somewhere else, you're now really screwed. In ways that a 
>> *real* merge will never screw you.
>> 
>> So the "--rebase" option really is only good for the lowest-level 
>> developers. And that should be documented.
>
> Fair enough.
>
> How about this in the man page:
>
> \--rebase::
> 	Instead of a merge, perform a rebase after fetching.
> 	*NOTE:* Never do this on branches you plan to publish!  This
> 	command will _destroy_ history, and is thus only suitable for
> 	topic branches to be submitted to another committer.
Nits.
(1) This "operation" will "rewrite"  history.
    You are not describing a command, but just one mode of operation
    of a command, whose other modes of operation do not share this
    history altering behaviour.
    The history is rewritten and made hard to work with for others
    who have previous incarnation of that history.  If it happens
    that nobody shared that previously published history nobody
    needs to suffer.  In that sense, there is something _usable_
    depending on who you are.  Destroy feels a bit too strong a
    word.
(2) This is not suitable for people who publish their trees and
    let others fetch and work off of them.
    Rebase is fine for e-mail submitting contributors as your
    description above suggests, but as your proposed commit log
    message said, it is also perfectly appropriate if your
    interaction with the outside world is "fetch + rebase +
    push".  You are not limited to "submitted to another
    committer".
Previous: Linus TorvaldsNext: Johannes Schindelin
Message 6 of 32 in “Teach 'git pull' the '--rebase' option”
  1. Teach 'git pull' the '--rebase' optionJohannes Schindelin, Oct 25, 2007
  2. Linus TorvaldsOct 25, 2007
  3. Johannes SchindelinOct 25, 2007
  4. Linus TorvaldsOct 25, 2007
  5. Linus TorvaldsOct 25, 2007
  6. Junio C HamanoOct 25, 2007
  7. Johannes SchindelinOct 26, 2007
  8. Junio C HamanoNov 28, 2007
  9. Teach 'git pull' about --rebaseJohannes Schindelin, Nov 28, 2007
  10. Jonathan del StrotherNov 28, 2007
  11. Johannes SchindelinNov 28, 2007
  12. Jakub NarebskiNov 28, 2007
  13. Steven GrimmNov 28, 2007
  14. Johannes SchindelinNov 28, 2007
  15. Lars HjemliNov 28, 2007
  16. Junio C HamanoNov 28, 2007
  17. Johannes SchindelinNov 28, 2007
  18. Steven GrimmNov 28, 2007
  19. J. Bruce FieldsNov 28, 2007
  20. J. Bruce FieldsNov 28, 2007
  21. Johannes SchindelinNov 28, 2007
  22. Junio C HamanoNov 28, 2007
  23. J. Bruce FieldsNov 28, 2007
  24. Johannes SchindelinNov 29, 2007
  25. Andreas EricssonNov 29, 2007
  26. Nicolas PitreNov 29, 2007
  27. Jon LoeligerNov 28, 2007
  28. Johannes SchindelinNov 28, 2007
  29. Björn SteinbrinkDec 1, 2007
  30. Karl HasselströmDec 3, 2007
  31. Jeff KingOct 26, 2007
  32. Jeff KingOct 26, 2007

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.