Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Git - apply patch to two branches

I am adding what I found so far to
http://wiki.eclipse.org/CDT/git

I also found I can do push of box branches at the same time which
saves extra push/fetch

I hate this push/fetch too - I already asked why we have to do 3
commands commit/push/fetch instead of one,
and if any way to automate it but nobody seems to know

On Mon, Jun 27, 2011 at 10:15 PM, Marc Khouzam
<marc.khouzam@xxxxxxxxxxxx> wrote:
> That is what I've been doing today too.  Works really well up to now.
>
> One detail I noticed during the day that I was not aware of but
> that you mention in your next to last step:
>> - Push..., add master to list of branches, then fetch
>                                                                        ^^^^^^
> When we push from local/master to origin/master, it seems that
> origin/master in my copy of the repo does not get updated.
> I have to explicitly do a fetch.  I was a bit surprised about this.
> It is not a big deal, but it is not what I expected.  I mean, if I push
> something to eclipse.org, don't I obviously want it locally?
> Maybe there is a setting I'm supposed to enable?
>
> Finally, FYI, but you probably know this, when fixing a bug or coding a feature,
> I don't do it directly on master or cdt_8_0.  Instead, I create a new branch
> (in Git Repo view, select Branches and right-click "Create branch...")
> say Bug12345MyNewFeature which is based on master (or cdt_8_0).
> You can then commit many times on that branch and still leave your
> master branch intact to get new fetches from eclipse.org.
> When the bug/feature is done, I then merge it to master, and push
> from master to origin/master.
>
> Marc
>
>
> ________________________________________
> From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Alena Laskavaia [elaskavaia.cdt@xxxxxxxxx]
> Sent: June 27, 2011 8:54 PM
> To: CDT General developers list.
> Subject: Re: [cdt-dev] Git - apply patch to two branches
>
> Ok I think I did it
> - I have local branch cdt_8_0 connected to origin/cdt_8_0
> - Applied patch, commit, push, push failed, fetch, rebase, push, success now
> - Create another local branch master -> origin/master
> - Right click on master - Checkout (it has black checkmark now)
> - In History view click on Show all branches icon - it shows master
> and cdt 8 now!
> - Find my commit on cdt_8_0, right click - Cherry pick - it is now on master
> - Push..., add master to list of branches, then fetch
> - Rich click on cdt_8_0 branch - > Checkout
>
>
>
>
> On Mon, Jun 27, 2011 at 8:44 PM, Alena Laskavaia
> <elaskavaia.cdt@xxxxxxxxx> wrote:
>> Hmm. I don't have Team -> Switch To > Master. There no Switch to menu
>> at all neither in project menus, nor repository context menu
>> I only have one local Branch - cdt_8_0, can I add master to that list some how?
>>
>> On Mon, Jun 27, 2011 at 1:22 PM, James Blackburn
>> <jamesblackburn@xxxxxxxxx> wrote:
>>> On 27 June 2011 16:33, Alena Laskavaia <elaskavaia.cdt@xxxxxxxxx> wrote:
>>>> I am really not familiar with git, I need exact instructions, i.e.
>>>> - I apply patch on my workspace which is local branch cdt_8_0 pointing
>>>> to remote branch_8_0
>>>> - I commit my change locally
>>>> - Now what? How to do I merge this change master? What exact command I run?
>>>
>>> You now push your cdt_8_0 to git.eclipse.org, so the changes are
>>> published to everyone on cdt_8_0.
>>>
>>> Then if you want to make the same change on master:
>>> - right click > team > Switch To > Master
>>> - Open history view, find change, right click > cherry pick.
>>> - check everything's ok, and push your master to eclipse.org.
>>>
>>> Cheers,
>>> James
>>>
>>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>


Back to the top