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

Re: Is there a way to have local changes in a branch 'bake' while working in different branches?

From
Aaron Schrab <aaron@schrab.com>
Date
Dec 15, 2016, 22:44 UTC
Message-ID
<20161215224408.GE2023@pug.qqx.org>
In-Reply-To
<14b481f95c5043aca6cdfddfe4728fa9@BLUPR79MB001.MGDADSK.autodesk.com>
At 20:14 +0000 15 Dec 2016, Larry Minton <larry.minton@autodesk.com> wrote:
Show 7 quoted lines
>Let's say I have a code change that I want to 'bake' for a while 
>locally, just to make sure some edge case doesn't pop up while I am 
>working on other things.  Is there any practical way of doing that?
>I could constantly merge that 'bake me' branch into other branches as I 
>work on them and then remove those changes from the branches before 
>sending them out for code review, but sooner or later pretty much 
>guaranteed to screw that up....
That sounds like the best way to me. How do you envision screwing it up?

If you anticipate messing up while removing the changes, that's only likely if there are conflicts and any other strategy is likely to be worse there.

If you suspect you'll forget to remove them before sending for code review there may be ways to help with that. Easiest you can add a large notice in the commit message(s) and/or comments; this may not prevent going for review but reviewers should catch it pretty quickly. To help prevent it even getting that far you may be able to add a pre-push hook to prevent such commits from being pushed to somewhere other than a private fork or a branch with a name that clearly indicates that it contains experimental code.

Previous: Larry MintonNext: Junio C Hamano
Message 2 of 4 in “Is there a way to have local changes in a branch 'bake' while working in different branches?”
  1. Larry MintonDec 15, 2016
  2. Aaron SchrabDec 15, 2016
  3. Junio C HamanoDec 16, 2016
  4. John KeepingDec 16, 2016

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.