On 9 May 2015 11:59 pm, "Michael" <keybou...@gmail.com> wrote:
> So here's something that I'd like to do, and I'm wondering if Git is the
right tool for this.
> I have a program's config file, that is broken up into a large number of
sections. One of them is causing a problem. All of them have been modified.
> The easiest way that I can think of to find which one is broken is to use
tools like git gui to select individual chunks, commit those, and then use
that new commit. But I don't know any way to use git to switch between
"This is the version that was checked in", and "this is the version that
has all the changes that need to be reviewed, probably all but one are
wanted". And then commit from the "version with too many changes" into the
"changes are reviewed" branch.
> What comes to mind as a good way to do this:
> 1. Commit the version that has too many (including the problem section)
edits made to it, to one branch.
> 2. Start a new branch (off the parent, not that over-edited commit), and
start that with a plain config file.
> 3. Repeat loop:
> a. Check out a copy from the branch in #1.
> b. Commit one chunk into the branch in #2.
> c. Reset the file to the version just checked in
> d. Test
> 4. As long as that works, each loop will test, and commit, one more
section of edits.
> The problem? I don't have any idea how to check out a copy of file X from
branch OverEdit into branch Testing.
> Is there a better way to do this with git? Is git the wrong tool?

How about putting each chunk in its own commit, then using bisect to find
which is the broken one. Once all is fixed you can squash it all into a
single change.


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to