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

Re: Submit/Workflow question

From
JFJ. Bruce Fields <bfields@fieldses.org>
Date
Jul 29, 2007, 16:03 UTC
Message-ID
<20070729160347.GA26637@fieldses.org>
In-Reply-To
<85abtfw6d5.fsf@lola.goethe.zz>
On Sun, Jul 29, 2007 at 05:56:54PM +0200, David Kastrup wrote:
Show 19 quoted lines
> 
> Suppose that I have created a half-baked patch A suiting my personal
> needs and went on from there, having something like
> 
> ...->A->B->...
> 
> Now at some point of time I decide that really A should be made fit
> for submission.  Basically, I'd want to do
> git-reset --hard A
> [edit some]
> git-commit --amend -a
> git-format-patch HEAD~1
> 
> in order to arrive at a nice submittable patch.  However, I don't want
> to lose B and the following stuff, and the resulting HEAD should
> include the improved of A (it is fine if that needs additional steps,
> and it is fine if it is just HEAD that gets the fixed version, not B).
> 
> So how to do this?  Branch at A^, rebase on A,

Just branch on A. Or actually I just check out A at this point (leaving me not on any branch).

> fix the stuff, commit
> with --amend -a, rebase on master, rename the temporary branch to
> master (killing the old master), format and submit the patch?

I'm not completely sure I follow that sequence, but something like that should work. A similar approach:

	http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#modifying-one-commit

I do something pretty close to what's described there, except I generally just cut and paste SHA1's instead of making the temporary tag.

--b.
Previous: David KastrupNext: David Kastrup
Message 3 of 5 in “Submit/Workflow question”
  1. David KastrupJul 29, 2007
  2. David KastrupJul 29, 2007
  3. J. Bruce FieldsJul 29, 2007
  4. David KastrupJul 29, 2007
  5. Jason SewallJul 29, 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.