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

Re: ! [rejected] master -> master (non-fast forward)

From
CMCatalin Marinas <catalin.marinas@arm.com>
Date
Nov 19, 2007, 17:47 UTC
Message-ID
<tnxbq9qyvom.fsf@pc1117.cambridge.arm.com>
In-Reply-To
<9e4733910711181042x123e99efjad38486654db17e2@mail.gmail.com>
"Jon Smirl" <jonsmirl@gmail.com> wrote:
> On 11/18/07, Junio C Hamano <gitster@pobox.com> wrote:
>> "Jon Smirl" <jonsmirl@gmail.com> writes:
>>
>> > What's causing this? I'm using stgit on the master branch.
[...]
Show 11 quoted lines
>> pushed "A" to the remote's 'master', then built this history:
>>
>>          o---o---A
>>         /
>>     ---o---o---o---o---A'
>>
>> by rewinding and rebuilding, and the tip of the branch now
>> points at A', which you tried to push to the remote.
>
> stgit must be doing this when I rebase. It pops all of it's patches,
> moves to head of linus/master and then rebases them.
[...]
Show 7 quoted lines
> What is the right way to share repositories using stgit? I have a set
> of patches which I am working on for kernel inclusion. I have them
> applied as a stgit stack on top of linus/master. I need to share this
> patch stack with other developers. These developers may want to change
> one of my patches. Right now they are emailing me deltas and I apply
> them to the appropriate stgit patch. I have seventeen patches in my
> stack currently.

StGIT is meant for keeping a clean history but with the big disadvantage that this history is volatile.

A solution is for the other developers to use StGIT or just git-rebase so that they always have the same base (volatile) history and keep their patches on top of yours.

A 2nd approach is to use topic branches rather than StGIT patches but you might lose some flexibility.

Yet another approach (which I used) is to keep a public branch (can be maintained by StGIT) where the history doesn't change and a devel volatile branch. When I modify some patches and they are ready for publishing, switch to the public branch and cherry-pick them (stg pick) from the devel branch. Because this is done with a three-way merge in StGIT, you will only get the new changes rather than the full patch. You need to change the patch message (as it is that of the original patch) to describe the specific changes and run 'stg refresh && stg commit' to store it into the immutable history (well, there is an 'uncommit' command as well if something goes wrong).

-- 
Catalin
Previous: Jon SmirlNext: Jon Smirl
Message 4 of 19 in “! [rejected] master -> master (non-fast forward)”
  1. Jon SmirlNov 18, 2007
  2. Junio C HamanoNov 18, 2007
  3. Jon SmirlNov 18, 2007
  4. Catalin MarinasNov 19, 2007
  5. Jon SmirlNov 19, 2007
  6. Daniel BarkalowNov 20, 2007
  7. Alex RiesenNov 18, 2007
  8. Jeff KingNov 20, 2007
  9. Alex RiesenNov 20, 2007
  10. Jeff KingNov 20, 2007
  11. 1/2 send-pack: cluster ref status reportingJeff King, Nov 20, 2007
  12. Alex RiesenNov 20, 2007
  13. Junio C HamanoNov 21, 2007
  14. Jeff KingNov 21, 2007
  15. Junio C HamanoNov 21, 2007
  16. Jeff KingNov 21, 2007
  17. Jeff KingNov 21, 2007
  18. 2/2 send-pack: print "maybe you need to pull" hintJeff King, Nov 20, 2007
  19. Alex RiesenNov 20, 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.