ok thanks - I'll read up on cherry picking

On Friday, September 13, 2013 6:06:40 AM UTC+10, Gergely Polonkai wrote:
>
> Cherry picking is your friend here. The easiest way maybe if you add the 
> bug fixing two lines as a separate commit. This way you will only have to 
> cherry pick that only commit. Otherwise, you may add -n to git-cherrypick, 
> so it won't commit the cherry picked commit instantly, but let you 
> investigate and possibly modify it.
>
>
> On 12 September 2013 21:47, GregH <greg.ha...@gmail.com <javascript:>>wrote:
>
>> What would be the steps required to achieve this?
>>
>> * create branch to work on a bug "branch1" from "master"
>> * checkout "branch1"
>> * make lots of changes to "branch1" putting in print statements all over 
>> the place etc, but then identifying the actual issue & fixing 
>> * in summary say then there are 20 changes in "branch1" but only 2 
>> changes (say one in two different files) are the bug fix itself
>>
>> Question is from this state how do a best with minimal work in git commit 
>> just these 2 changes only back to the main branch?  
>>
>> Note - Probably doesn't affect the answer but I'm using SourceTree as my 
>> git GUI.
>>
>>
>> thanks
>>
>> -- 
>> 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+...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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/groups/opt_out.

Reply via email to