git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Is there a way to have local changes in a branch 'bake' while working in different branches?
@ 2016-12-15 20:14 Larry Minton
  2016-12-15 22:44 ` Aaron Schrab
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Larry Minton @ 2016-12-15 20:14 UTC (permalink / raw)
  To: git@vger.kernel.org

Lars Schneider recommended I ask you this question.

My question:

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....

His response:

Good question. Your merging idea would work but I agree it might be cumbersome. In this situation I keep modified files in my tree. That would work for you too, but this would be inconvenient if you have many changed files. I wonder how the Git core guys manage this kind of situation.

Thanks,

Larry Minton
3ds Max Core team
LiveDesign Group
Media & Entertainment, Education Experiences, Impact (MEI)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is there a way to have local changes in a branch 'bake' while working in different branches?
  2016-12-15 20:14 Is there a way to have local changes in a branch 'bake' while working in different branches? Larry Minton
@ 2016-12-15 22:44 ` Aaron Schrab
  2016-12-16  0:07 ` Junio C Hamano
  2016-12-16 15:22 ` John Keeping
  2 siblings, 0 replies; 4+ messages in thread
From: Aaron Schrab @ 2016-12-15 22:44 UTC (permalink / raw)
  To: Larry Minton; +Cc: git@vger.kernel.org

At 20:14 +0000 15 Dec 2016, Larry Minton <larry.minton@autodesk.com> wrote:
>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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is there a way to have local changes in a branch 'bake' while working in different branches?
  2016-12-15 20:14 Is there a way to have local changes in a branch 'bake' while working in different branches? Larry Minton
  2016-12-15 22:44 ` Aaron Schrab
@ 2016-12-16  0:07 ` Junio C Hamano
  2016-12-16 15:22 ` John Keeping
  2 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2016-12-16  0:07 UTC (permalink / raw)
  To: Larry Minton; +Cc: git@vger.kernel.org

Larry Minton <larry.minton@autodesk.com> writes:

> Lars Schneider recommended I ask you this question.
>
> My question:
>
> 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?

That sounds exactly like what I have been doing for the past several
years in public around here ;-)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is there a way to have local changes in a branch 'bake' while working in different branches?
  2016-12-15 20:14 Is there a way to have local changes in a branch 'bake' while working in different branches? Larry Minton
  2016-12-15 22:44 ` Aaron Schrab
  2016-12-16  0:07 ` Junio C Hamano
@ 2016-12-16 15:22 ` John Keeping
  2 siblings, 0 replies; 4+ messages in thread
From: John Keeping @ 2016-12-16 15:22 UTC (permalink / raw)
  To: Larry Minton; +Cc: git@vger.kernel.org

On Thu, Dec 15, 2016 at 08:14:58PM +0000, Larry Minton wrote:
> My question:
> 
> 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....

I wrote a tool [1] a while ago to manage integration branches so I use a
personal integration branch to pull together various in-progress
branches.

It means you can keep each topic in its own branch but work/test on top
of a unified branch by running:

	git integration --rebuild my-integration-branch

whenever you change one of the topic branches.

I also use the instruction sheet to keep track of abandoned topics that
I might want to go back to but which are currently in a broken state,
you can see an example of that in my CGit integration branch [2].


[1] http://johnkeeping.github.io/git-integration/
[2] https://github.com/johnkeeping/cgit/blob/d01ce31ed3dfa9b05ef971464da2af5b9d6f2756/GIT-INTEGRATION-INSN

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-16 15:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-15 20:14 Is there a way to have local changes in a branch 'bake' while working in different branches? Larry Minton
2016-12-15 22:44 ` Aaron Schrab
2016-12-16  0:07 ` Junio C Hamano
2016-12-16 15:22 ` John Keeping

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).