Re: Converting from anonymous git clone to eponymous



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

HTH,
Santi


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