In the following example we will use the package gamboostLSS
. Replace this were necessary.
First "download" (clone
) existing r-forge repository
mkdir gamboostLSS
cd gamboostLSS
git svn clone svn+ssh://[email protected]/svnroot/gamboostlss .
Check that .git/config
has the following entry:
[svn-remote "rforge"]
url = path/or/url/to/svn/repository
fetch = :refs/remotes/r-forge-svn
Rename the master branch:
git branch -m rforge-local
Now create a branch that is supposed to be linked to github:
git checkout -b master
Now create a new repository (here gamboostLSS
) on github and push the local branch to this repository:
git remote add origin [email protected]:hofnerb/gamboostLSS.git
git push -u origin master
Now one can rename the local github branch (if desired).
If one has commited one or more changes to the github branch master
, one needs to merge this branch with the r-forge branch rforge-local
. To do so, one uses
git checkout rforge-local
git merge --squash master
git commit -m "some dummy text"
git commit --amend
The last two lines are only neccessary to get an (almost) empty commit message. Usually, the commit message after a squashmerge
is overly rich and lengthy. If the desired commit message is short anyway one can skip the last step and type this message directly instead of "some dummy text"
.
To finalize the commit, one needs to rebase
and dcommit
the local r-forge branch:
git svn rebase
git svn dcommit