Skip to content

Migration to Github

Sébastien Loriot edited this page Oct 21, 2025 · 2 revisions

Table of Contents

Since the 5th of March 2015, the Git repositories of the CGAL project are hosted on GitHub.

Create a GitHub account

The first step is to create a GitHub account as described here.

Migration Procedure for Regular Developers

We describe here the procedure to migrate a repository that was using ssh://[email protected]/var/git/cgal.git as url for the origin remote and ssh://[email protected]/var/git/cgal-gsoc.git as url for the gsoc remote. If you have only one remote choose the correct one (cgal-public-dev if you are a student or cgal-dev if you are a regular developer).

Rename your origin remote to cgal-dev and update its url:

 cd ~/CGAL/git/cgal #where your git clone is locate on your disk git remote rename origin cgal-dev git remote set-head cgal-dev integration git remote set-url cgal-dev [email protected]:CGAL/cgal-dev.git git fetch --all --prune

Rename your gsoc to cgal-public-dev and update its url:

 git remote rename gsoc cgal-public-dev git remote set-url cgal-public-dev [email protected]:CGAL/cgal-public-dev.git

Main is no longer writable for regular developers. You need to setup a new remote to access it:

 git remote add cgal [email protected]:CGAL/cgal.git

and set the tracking branch of your local main branch:

 git fetch cgal git branch --set-upstream-to=cgal/main main # for git < 1.8: git branch --set-upstream main cgal/main

The command git remote -v should now show the following:

    $ git remote -v
    cgal    [email protected]:CGAL/cgal.git (fetch)
    cgal    [email protected]:CGAL/cgal.git (push)
    cgal-dev        [email protected]:CGAL/cgal-dev.git (fetch)
    cgal-dev        [email protected]:CGAL/cgal-dev.git (push)
    cgal-public-dev   [email protected]:CGAL/cgal-public-dev.git (fetch)
    cgal-public-dev   [email protected]:CGAL/cgal-public-dev.git (push)

You can now fetch all the remotes at once with:

 git fetch --all

Migration Procedure for Student Developers

Rename your origin to cgal-public-dev and update its url:

 cd ~/CGAL/git/cgal #where your git clone is locate on your disk git remote rename origin cgal-public-dev git remote set-head cgal-public-dev -d git remote set-url cgal-public-dev [email protected]:CGAL/cgal-public-dev.git git fetch --all --prune

Main is not writable. You need to setup a new remote to access it:

 git remote add cgal [email protected]:CGAL/cgal.git

and set the tracking branch of your local main branch:

 git fetch cgal git branch --set-upstream-to=cgal/main main # for git < 1.8: git branch --set-upstream main cgal/main

The command git remote -v should now show the following:

    $ git remote -v
    cgal    [email protected]:CGAL/cgal.git (fetch)
    cgal    [email protected]:CGAL/cgal.git (push)
    cgal-dev        [email protected]:CGAL/cgal-dev.git (fetch)
    cgal-dev        [email protected]:CGAL/cgal-dev.git (push)
    cgal-public-dev   [email protected]:CGAL/cgal-public-dev.git (fetch)
    cgal-public-dev   [email protected]:CGAL/cgal-public-dev.git (push)

You can now fetch the two remotes at once with:

 git fetch --all

Migration Procedure for Web Developers

Rename your origin to cgal-web and update its url:

 cd ~/CGAL/git/cgal #where your git clone is locate on your disk git remote rename origin cgal-web git remote set-url cgal-web [email protected]:CGAL/cgal-web.git

Verify all is good:

 git fetch --all

New procedure to merge a branch into main

We now use pull requests.

Clone this wiki locally