Git Convert Anonymous To Eponymous

The tip is to simply do

git config remote.origin.url ssh://MYUSERNAME@git.gnome.org/git/MODULENAME

The rest of this page describes another method that is not recommended anymore.

=STOP STOP STOP=

The following remain here for historical purposes.

We assume that you have an anonymous clone of a GNOME module, such as

$ git clone git://git.gnome.org/eog/ eog-anonymous/
Initialized empty Git repository in /tmp/eog-anonymous/.git/
remote: Counting objects: 30489, done.
remote: Compressing objects: 100% (6098/6098), done.
remote: Total 30489 (delta 24477), reused 30198 (delta 24279)
Receiving objects: 100% (30489/30489), 10.20 MiB | 1773 KiB/s, done.
Resolving deltas: 100% (24477/24477), done.
$ _

Now, let's see the remote information that the anonymous clone has

$ cd eog-anonymous
$ git remote show origin
* remote origin
  URL: git://git.gnome.org/eog
  Remote branch merged with 'git pull' while on branch master
    master
  Tracked remote branches
    EOG_2_12_1
    GCONF_BRANCH2
    GNOME_2_12_BRANCHPOINT
    GNOME_2_PORT
    eog-0-6
    eog-for-gnome-1-4
    eog-ng
    experimental-job-mgr
    gnome-2-0
    gnome-2-10
    gnome-2-12
    gnome-2-14
    gnome-2-16
    gnome-2-18
    gnome-2-18_svn3671
    gnome-2-2
    gnome-2-20
    gnome-2-22
    gnome-2-24
    gnome-2-26
    gnome-2-4
    gnome-2-6
    gnome-2-8
    master
$ _

A normal eponymous clone looks like

$ git remote show origin
* remote origin
  URL: ssh://simos@git.gnome.org/git/eog
  Remote branch merged with 'git pull' while on branch master
    master
  Tracked remote branches
    EOG_2_12_1
    GCONF_BRANCH2
    GNOME_2_12_BRANCHPOINT
    GNOME_2_PORT
    eog-0-6
    eog-for-gnome-1-4
    eog-ng
    experimental-job-mgr
    gnome-2-0
    gnome-2-10
    gnome-2-12
    gnome-2-14
    gnome-2-16
    gnome-2-18
    gnome-2-18_svn3671
    gnome-2-2
    gnome-2-20
    gnome-2-22
    gnome-2-24
    gnome-2-26
    gnome-2-4
    gnome-2-6
    gnome-2-8
    master
$ _

So, we visit the anonymous clone and we change the origin,

$ git remote rm origin
$ git remote add origin -m master -f ssh://simos@git.gnome.org/git/eog/
Updating origin
From ssh://simos@git.gnome.org/git/eog
 * [new branch]      EOG_2_12_1 -> origin/EOG_2_12_1
 * [new branch]      GCONF_BRANCH2 -> origin/GCONF_BRANCH2
 * [new branch]      GNOME_2_12_BRANCHPOINT -> origin/GNOME_2_12_BRANCHPOINT
 * [new branch]      GNOME_2_PORT -> origin/GNOME_2_PORT
 * [new branch]      eog-0-6    -> origin/eog-0-6
 * [new branch]      eog-for-gnome-1-4 -> origin/eog-for-gnome-1-4
 * [new branch]      eog-ng     -> origin/eog-ng
 * [new branch]      experimental-job-mgr -> origin/experimental-job-mgr
 * [new branch]      gnome-2-0  -> origin/gnome-2-0
 * [new branch]      gnome-2-10 -> origin/gnome-2-10
 * [new branch]      gnome-2-12 -> origin/gnome-2-12
 * [new branch]      gnome-2-14 -> origin/gnome-2-14
 * [new branch]      gnome-2-16 -> origin/gnome-2-16
 * [new branch]      gnome-2-18 -> origin/gnome-2-18
 * [new branch]      gnome-2-18_svn3671 -> origin/gnome-2-18_svn3671
 * [new branch]      gnome-2-2  -> origin/gnome-2-2
 * [new branch]      gnome-2-20 -> origin/gnome-2-20
 * [new branch]      gnome-2-22 -> origin/gnome-2-22
 * [new branch]      gnome-2-24 -> origin/gnome-2-24
 * [new branch]      gnome-2-26 -> origin/gnome-2-26
 * [new branch]      gnome-2-4  -> origin/gnome-2-4
 * [new branch]      gnome-2-6  -> origin/gnome-2-6
 * [new branch]      gnome-2-8  -> origin/gnome-2-8
 * [new branch]      master     -> origin/master
$ git config branch.master.remote origin
$ git config branch.master.merge refs/heads/master
$ _

Now we have a proper, converted, eponymous clone. Let's pull,

$ git pull --rebase
Current branch master is up to date.
$ _

=======================

$ git clone git://git.gnome.org/MODULENAME
...
$ cd MODULENAME
$ git remote rm origin
$ git remote add origin -m master -f ssh://MYUSERNAME@git.gnome.org/git/MODULENAME/
Updating origin
From ssh://MYUSERNAME@git.gnome.org/git/MODULENAME
.....
 * [new branch]      gnome-2-20 -> origin/gnome-2-20
 * [new branch]      gnome-2-22 -> origin/gnome-2-22
 * [new branch]      gnome-2-24 -> origin/gnome-2-24
 * [new branch]      gnome-2-26 -> origin/gnome-2-26
 * [new branch]      gnome-2-4  -> origin/gnome-2-4
 * [new branch]      gnome-2-6  -> origin/gnome-2-6
 * [new branch]      gnome-2-8  -> origin/gnome-2-8
 * [new branch]      master     -> origin/master
$ git config branch.master.remote origin
$ git config branch.master.merge refs/heads/master
$ _

SimosXenitellis/GitConvertAnonymousToEponymous (last edited 2009-05-08 17:51:28 by SimosXenitellis)