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

Re: [RFC/PATCH 1/2] rebuash - squash/rebase in a single step

From
Edmundo Carmona Antoranz <eantoranz@gmail.com>
Date
Jul 1, 2019, 20:48 UTC
Message-ID
<CAOc6etZWKOGDX749i=8R2V44HGtemL3-n0=01WH6amcRro-uPw@mail.gmail.com>
In-Reply-To
<xmqqy31h612o.fsf@gitster-ct.c.googlers.com>
On Mon, Jul 1, 2019 at 12:51 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
>
>
> That part is understandable, but is "rebase-and-squash" a tool
> intended to be used by the contributor to respond to that request?
>
> Wouldn't the developer just do
>
>         git checkout topic
>         git fetch
>         git rebase [-i] [@{upstream}]
>         git push [publish +topic]
>
> to update the topic and ask to be pulled again?  The two steps in
> the middle may be "pull --rebase", but my point is I do not quite
> see where the new squash/rebase-in-a-single-step thing comes into
> this picture.  There may be a different picture that it fits, but
> I do not think it is this one.
>
>

I think rebasing -i makes sense* _if_ there are no conflicts on the way to reach the current state of the branch if the developer was pulling while developing the feature branch. If there are conflicts that I took care of when i was pulling, i don't want to run rebase -i to have to deal with them yet again. So rebuash would help developers with or without merges with upstream on their feature branch, with or without conflicts on those merges (if there are merges), get their development into a single revision without having to write 4 or 5 git commands, as Jeff was saying, if it makes workflows simpler....

* rebase -i is the way I see people solve their "squash and rebase"
needs (pick the first revision, then squash all the others... but what
happens if the very first revision is conflicting with the current
state of upstream?), but I (for one) do it the way rebuash is doing:
merge with upstream, reset --soft to upstream, commit, voila! That's
why i wrote rebuash in the first place, just so you can see where I'm
coming from.
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 13 in “rebuash - squash/rebase in a single step”
  1. 1/2 rebuash - squash/rebase in a single stepEdmundo Carmona Antoranz, Jun 30, 2019
  2. 2/2 rebuash - support for statusEdmundo Carmona Antoranz, Jun 30, 2019
  3. Edmundo Carmona AntoranzJun 30, 2019
  4. Jeff KingJun 30, 2019
  5. Edmundo Carmona AntoranzJun 30, 2019
  6. Jeff KingJun 30, 2019
  7. Edmundo Carmona AntoranzJul 1, 2019
  8. Junio C HamanoJul 1, 2019
  9. Edmundo Carmona AntoranzJul 1, 2019
  10. Junio C HamanoJul 1, 2019
  11. Derrick StoleeJul 2, 2019
  12. Junio C HamanoJul 2, 2019
  13. Johannes SixtJul 2, 2019

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.