{"thread":{"id":"44713","subject":"Is there a way to have local changes in a branch 'bake' while working in different branches?","startedAt":"2016-12-15T20:16:03Z","lastAt":"2016-12-16T15:42:47Z","messageCount":4,"participants":["Larry Minton","Aaron Schrab","Junio C Hamano","John Keeping"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"307863","messageId":"14b481f95c5043aca6cdfddfe4728fa9@BLUPR79MB001.MGDADSK.autodesk.com","threadId":"44713","inReplyTo":null,"subject":"Is there a way to have local changes in a branch 'bake' while working in different branches?","fromName":"Larry Minton","fromEmail":"larry.minton@autodesk.com","sentAt":"2016-12-15T20:14:58Z","receivedAt":"2016-12-15T20:16:03Z","isPatch":false,"sender":{"key":"larry.minton@autodesk.com","avatar":null},"body":"Lars Schneider recommended I ask you this question.\n\nMy question:\n\nLet'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? \nI 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....\n\nHis response:\n\nGood 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.\n\nThanks,\n\nLarry Minton\n3ds Max Core team\nLiveDesign Group\nMedia & Entertainment, Education Experiences, Impact (MEI)\n\n"},{"id":"307867","messageId":"20161215224408.GE2023@pug.qqx.org","threadId":"44713","inReplyTo":"14b481f95c5043aca6cdfddfe4728fa9@BLUPR79MB001.MGDADSK.autodesk.com","subject":"Re: Is there a way to have local changes in a branch 'bake' while working in different branches?","fromName":"Aaron Schrab","fromEmail":"aaron@schrab.com","sentAt":"2016-12-15T22:44:08Z","receivedAt":"2016-12-15T22:45:26Z","isPatch":false,"sender":{"key":"aaron@schrab.com","avatar":"https://avatars.githubusercontent.com/u/39620?v=4"},"body":"At 20:14 +0000 15 Dec 2016, Larry Minton <larry.minton@autodesk.com> wrote:\n>Let's say I have a code change that I want to 'bake' for a while \n>locally, just to make sure some edge case doesn't pop up while I am \n>working on other things.  Is there any practical way of doing that?\n>I could constantly merge that 'bake me' branch into other branches as I \n>work on them and then remove those changes from the branches before \n>sending them out for code review, but sooner or later pretty much \n>guaranteed to screw that up....\n\nThat sounds like the best way to me. How do you envision screwing it up?\n\nIf you anticipate messing up while removing the changes, that's only \nlikely if there are conflicts and any other strategy is likely to be \nworse there.\n\nIf you suspect you'll forget to remove them before sending for code \nreview there may be ways to help with that. Easiest you can add a large \nnotice in the commit message(s) and/or comments; this may not prevent \ngoing for review but reviewers should catch it pretty quickly. To help \nprevent it even getting that far you may be able to add a pre-push hook \nto prevent such commits from being pushed to somewhere other than a \nprivate fork or a branch with a name that clearly indicates that it \ncontains experimental code.\n"},{"id":"307869","messageId":"xmqqwpf0u46k.fsf@gitster.mtv.corp.google.com","threadId":"44713","inReplyTo":"14b481f95c5043aca6cdfddfe4728fa9@BLUPR79MB001.MGDADSK.autodesk.com","subject":"Re: Is there a way to have local changes in a branch 'bake' while working in different branches?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-12-16T00:07:47Z","receivedAt":"2016-12-16T00:08:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Larry Minton <larry.minton@autodesk.com> writes:\n\n> Lars Schneider recommended I ask you this question.\n>\n> My question:\n>\n> Let's say I have a code change that I want to 'bake' for a while\n> locally, just to make sure some edge case doesn't pop up while I\n> am working on other things. Is there any practical way of doing\n> that?\n\nThat sounds exactly like what I have been doing for the past several\nyears in public around here ;-)\n\n"},{"id":"307887","messageId":"20161216152227.GA1783@john.keeping.me.uk","threadId":"44713","inReplyTo":"14b481f95c5043aca6cdfddfe4728fa9@BLUPR79MB001.MGDADSK.autodesk.com","subject":"Re: Is there a way to have local changes in a branch 'bake' while working in different branches?","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2016-12-16T15:22:27Z","receivedAt":"2016-12-16T15:42:47Z","isPatch":false,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"On Thu, Dec 15, 2016 at 08:14:58PM +0000, Larry Minton wrote:\n> My question:\n> \n> Let's say I have a code change that I want to 'bake' for a while\n> locally, just to make sure some edge case doesn't pop up while I am\n> working on other things.  Is there any practical way of doing that?  I\n> could constantly merge that 'bake me' branch into other branches as I\n> work on them and then remove those changes from the branches before\n> sending them out for code review, but sooner or later pretty much\n> guaranteed to screw that up....\n\nI wrote a tool [1] a while ago to manage integration branches so I use a\npersonal integration branch to pull together various in-progress\nbranches.\n\nIt means you can keep each topic in its own branch but work/test on top\nof a unified branch by running:\n\n\tgit integration --rebuild my-integration-branch\n\nwhenever you change one of the topic branches.\n\nI also use the instruction sheet to keep track of abandoned topics that\nI might want to go back to but which are currently in a broken state,\nyou can see an example of that in my CGit integration branch [2].\n\n\n[1] http://johnkeeping.github.io/git-integration/\n[2] https://github.com/johnkeeping/cgit/blob/d01ce31ed3dfa9b05ef971464da2af5b9d6f2756/GIT-INTEGRATION-INSN\n"}]}