[Libreoffice] Git question again

Wols Lists antlists at youngman.org.uk
Wed Nov 24 14:21:28 PST 2010


On 24/11/10 22:07, Julien Nabet wrote:
> Le 24/11/2010 23:03, Miklos Vajna a écrit :
>> On Wed, Nov 24, 2010 at 10:42:58PM +0100, Julien
>> Nabet<serval2412 at yahoo.fr>  wrote:
>>   
>>> Now i do :
>>> bin/g pull -r
>>>
>>> and i got this :
>>> ===== components =====
>>> usage: git merge-base [-a|--all]<commit>  <commit>...
>>>
>>>       -a, --all             outputs all common ancestors
>>>
>>> usage: git merge-base [-a|--all]<commit>  <commit>...
>>>
>>>       -a, --all             outputs all common ancestors
>>> ...
>>>
>>> You are not currently on a branch, so I cannot use any
>>>      
>> It's not obvious for me, either. Maybe you did something else as well
>> what you forgot to mention. :) What is the output of git branch in
>> 'rawbuild/components'? if it's not "* master", then use 'git checkout
>> master' to switch to master, then g pull -r should work.
>>    
> Here what i've got :
> serval at serval:~/libreoffice-source/build/clone$ git branch
> * master
> serval at serval:~/libreoffice-source/build/clone$ cd components/
> serval at serval:~/libreoffice-source/build/clone/components$ git branch
> * (no branch)
>   master
> serval at serval:~/libreoffice-source/build/clone/components$ cd cui/
> serval at serval:~/libreoffice-source/build/clone/components/cui$ git branch
> * (no branch)
>   master
> serval at serval:~/libreoffice-source/build/clone/components/cui$ cd source/
> serval at serval:~/libreoffice-source/build/clone/components/cui/source$
> git branch
> * (no branch)
>   master
> serval at serval:~/libreoffice-source/build/clone/components/cui/source$
> cd customize/
> serval at serval:~/libreoffice-source/build/clone/components/cui/source/customize$
> git branch
> * (no branch)
>   master

Rather than cd'ing into each branch you can "bin/g branch" and it'll
list all the branches for all the subdirectories.

Fix your current problem with "bin/g checkout master". Just be careful,
because you could easily lose any changes you've made to your "no
branch" branch :-)
>
> I call git branch on the different subdirectories because i don't know
> if you can have "master" at the top level and <other branch> at
> another level

I do. Whether it's a good idea or not, I don't know, but when working in
a subdirectory I will happily do a "git checkout -b newbranch". But when
I'm resync'ing with upstream I *always* do a "bin/g checkout master" to
make sure all subdirectories are reset to master. Then I'll recheckout
my newbranch in just that subdirectory to carry on working.

btw, you do know how to use "git --help"? eg "git branch --help" will
tell you all about the git branch command?

Cheers,
Wol


More information about the LibreOffice mailing list