Re: Converting from anonymous git clone to eponymous



On Thu, May 7, 2009 at 11:43 PM, Santi Béjar <santi agolina net> wrote:
> 2009/5/7 Simos Xenitellis <simos lists googlemail com>:
>> On Thu, May 7, 2009 at 10:25 PM, Owen Taylor <otaylor redhat com> wrote:
>>> On Thu, 2009-05-07 at 20:21 +0100, Simos Xenitellis wrote:
>>>> I did some more testing and I have put up a temporary page at
>>>> http://live.gnome.org/SimosXenitellis/GitConvertAnonymousToEponymous
>>>>
>>>> The gist is that if you have an anonymous clone, you can convert to
>>>> eponymous with the following four commands,
>>>>
>>>> 1. git remote rm origin
>>>> 2. git remote add origin -f -m master
>>>> ssh://MYUSERNAME git gnome org/git/MODULENAME/
>>>> 3. git config branch.master.remote origin
>>>> 4. git config branch.master.merge refs/heads/master
>>>
>>> Isn't
>>>
>>>  git config remote.origin.url ssh://MYUSERNAME git gnome org/git/MODULENAME/
>>>
>>> enough? (I usually just edit .git/config with an editor, but the above
>>> should be the same thing.)
>>
>> When you try to 'git pull --rebase', the command fails because git
>> does not know that it should pull from 'master'.
>> Only by using the four commands above, can the MODULENAME/.git/config
>> file of the anonymous clone become identical with the .git/config of
>> an eponymous clone of the same MODULE.
>
> The git config remote.origin.url thing is enough. Without the "git
> remote rm ...".
>
> Just do:
>
> git clone anonurl
> cd path/to/clone
> git config remote.origin.url pushingurl

This looks more reasonable.
When I was testing with anonymous clones, for some reason I did not
get a full set .git/config file.
I am unable to replicate this issue, so I'll take the above solution
at the moment.

Cheers,
Simos


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]