I'm the original author.

The problem as you've discovered is branches named master.

Originally, I wrote the procedure for use over in the tinyprod/prod and
tp-freeforall/prod repository family.   I was careful to avoid using the
branch name master.   Master is the generic git branch.

When I tweaked the write up for the switch from svn to github, I missed the
master name collision and was too busy doing other stuff and didn't test
it.   Sigh.

Thanks for finding this.  I'm not sure what else is broken so if you keep
going that would be cool.   I will be tweaking the document later tonight
to fix the procedure.  So please update and see if the new procedure works
better.

The intent is your changes are concentrated on the
gh:FlyingCampDesign/tinyos-main(cw) branch.   While
gh:FlyingCampDesign/tinyos-main(master) is used to continue to track the
upstream from gh:tinyos/tinyos-main(master).   So I don't think we need the
gh:FlyingCampDesign/tinyos-main(master-up) branch.   You can always
reference the upstream master branch via the reference up/master.

As new changes come in from the mainline, you update your local copy of
master by merging from up/master.  It should always be a fast-forward.

On Sat, Feb 2, 2013 at 7:47 PM, Christopher Wilson <
cwil...@flyingcampdesign.com> wrote:

> On 2/2/13 6:36 PM, Christopher Wilson wrote:
>
>> I'm trying to figure out if the following line in 00b_Using_the_Repo doc
>> is actually correct (and I'm missing something), or is a typo?
>>
>> git checkout -t up/master               # create a tracking branch.
>>
>> Here's what happens when I try to follow the workflow perscribed in the
>> doc:
>>
>> [First, I forked the repo in github]
>>
>> $ git clone 
>> git://github.com/**FlyingCampDesign/tinyos-main.**git<http://github.com/FlyingCampDesign/tinyos-main.git>tinyos-2.x
>> Cloning into 'tinyos-2.x'...
>> remote: Counting objects: 39119, done.
>> remote: Compressing objects: 100% (9688/9688), done.
>> remote: Total 39119 (delta 29065), reused 38823 (delta 28887)
>> Receiving objects: 100% (39119/39119), 30.68 MiB | 94 KiB/s, done.
>> Resolving deltas: 100% (29065/29065), done.
>> Checking out files: 100% (6110/6110), done.
>> $ cd tinyos-2.x/
>> $ git remote add up 
>> git://github.com/tinyos/**tinyos-main<http://github.com/tinyos/tinyos-main>
>> $ git fetch up
>> remote: Counting objects: 14, done.
>> remote: Compressing objects: 100% (1/1), done.
>> remote: Total 8 (delta 7), reused 8 (delta 7)
>> Unpacking objects: 100% (8/8), done.
>>  From 
>> git://github.com/tinyos/**tinyos-main<http://github.com/tinyos/tinyos-main>
>>   * [new branch]      master     -> up/master
>> $ git branch
>> * master
>> $ git checkout -t up/master
>> fatal: A branch named 'master' already exists.
>>
>> This fails because master branch already exists when I checked out the
>> fork.  However, I'm not sure what this line should actually read?  I'm
>> assuming that the intention is to create a local branch that tracks the
>> tinyos-main(master) branch, but in that case I would assume that the line
>> should be something like:
>>
>> $ git checkout -t up/master-up
>>
>> Anybody able to shed some insight into the workflow intended in the doc?
>>
>> Thanks,
>> Chris
>>
>>
> Here I go talking about typos and I typed one myself...
>
> I mis-typed that last command (git checkout -t up/master-up).  I meant to
> type:
>
> $ git checkout -b master-up -t up/master
> Branch master-up set up to track remote branch master from up.
> Switched to a new branch 'master-up'
>
> Chris
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to