Skip to content

Version release tips

Norihiro Watanabe edited this page Jul 13, 2015 · 5 revisions

Generating change logs from git log (temporal approach and to be improved)

git log --pretty=format:'[%s] %b' --merges --after={2014-06-27} --first-parent

Connect your Git repository to Subversion (original post)

The following steps are required to synchronize the SVN and git repositories.

$ mkdir sources
$ cd sources
$ git clone (your GitHub repository)
$ git remote add ufz [email protected]:envinf/ogs5-trunk.git
$ git fetch ufz
$ git checkout master
$ git svn init https://svn.ufz.de/svn/ogs/trunk/sources 
$ git config svn.authorsfile ../authors.txt
$ git update-ref refs/remotes/git-svn refs/remotes/ufz/master
$ git svn rebase

Now you can sync the current branch (use always the master branch!) to Subversion with git svn dcommit (you may also want to append --dry-run to the command to see what gets synced before you actually sync).

To sync changes from Subversion to Git use git svn rebase.

Commit to SVN repository

It's recommended to push git commits to a SVN repository from a release or develop branch rather than from master as below. This way makes SVN keep commit tree simple (dcommit always changes SHA of the last commit by adding SVN rev.) and store all git commits separately (see here).

$ git checkout my_branch
.....working....
$ git svn fetch --use-log-author
$ git svn rebase
$ git svn dcommit --add-author-from
$ git checkout master
$ git svn fetch --use-log-author
$ git svn rebase
$ git push ufz master
$ git branch -d my_branch

If any directory was deleted in git commits, you need to manually delete those directories using svn commands after git svn dcommit

$ svn delete (directory name)
$ svn commit -m "delete empty directories" 

git svn rebase may fail if your branch is not made on the top of master branch. In that case, you need to move new commits on the same commit tree as master branch by invoking git rebase -i master. In the interaction mode, you need to delete old commits and keep only new commits which don't exist in the SVN repository.

Authors file

Authors file is needed to map commit author names between SVN and git repositories (see here). The following is my ad-hoc list of all the possible authors (some are clearly not authors). Copy and save the following list in authors.txt

hew = Wenkui He <[email protected]>
hw = Holger Weiss <[email protected]>
soswald = Sascha Oswald <[email protected]>
kalbus = Edda Kalbus <[email protected]>
zehner = Bjoern Zehner <[email protected]>
tschnick = Thomas Schnicke <[email protected]>
fhesse = Falk Hesse <[email protected]>
dkahlenb = Daniel Kahlenberg <[email protected]>
okolditz = Olaf Kolditz <[email protected]>
wwang = Wenqinq Wang <[email protected]>
Wenqing Wang = Wenqinq Wang <[email protected]>
haibing = Habing Shao <[email protected]>
pechstei = Armin Pechstein <[email protected]>
raduflor = Florian Adrian Radu <[email protected]>
centlerf = Florian Centler <[email protected]>
watanabe = Norihiro Watanabe <[email protected]>
delfs = Jens-Olaf Delfs <[email protected]>
bilke = Lars Bilke <[email protected]>
fengs = Feng Sun <[email protected]>
FENGS = Feng Sun <[email protected]>
goerke = Uwe Jens Goerke <[email protected]>
wuya = Yajie Wu <[email protected]>
graebe = Agnes Graebe <[email protected]>
kalbache = Thomas Kalbacher <[email protected]>
singha = Ashok Kumar Singh <[email protected]>
muelleth = Thomas Mueller <[email protected]>
marxa = Andreas Marx <[email protected]>
rinkk = Karsten Rink <[email protected]>
taron = Joshua Taron <[email protected]>
sun = Yuanyuan Sun <[email protected]>
fischeth = Thomas Fischer <[email protected]>
zech = Alraune Zech <[email protected]>
trauth = Nico Trauth <[email protected]>
dinizcon = Tatiana Diniz Goncalves <[email protected]>
lankenau = Lena Lankenau <[email protected]>
lavergne = Remi Lavergne <[email protected]>
frenkel = Marcus Frenkel <[email protected]>
selle = Benny Selle <[email protected]>
extjulia = Julia Grunwald <[email protected]>
extmcder = Prof. Christopher McDermott <[email protected]>
exteichh = Eila Eichhorn <[email protected]>
extboett = Norbert Boettcher <[email protected]>
extidiar = Andres Idiart <[email protected]>
# extwalth = Marc Walther <>
extmauro = Mauro Cacace <[email protected]>
extxie = Mingliang Xie <[email protected]>
extcheru = Yvonne Cherubini <[email protected]>
extmarco = Marco de Lucia <[email protected]>
extbloec = Guido Bloecher <[email protected]>
extkempk = Thomas Kempka <[email protected]>
exthokr = Milan Hokr <[email protected]>
extfranc = Joachim Francke <[email protected]>
extwu = Wenjie Xu <[email protected]>
extnowak = Thomas Nowak <[email protected]>
extyoon = Jeoung Seok Yoon <[email protected]>
extkunz = Herbert Kunz <[email protected]>
extshao = Hua Shao <[email protected]>
exttian = Hong Tian <[email protected]>
extratei = Matthias Rateitzak <[email protected]>
extstadl = Susanne Stadler <[email protected]>
extnakar = Kenichiro Nakarai <[email protected]>
extkosak = Georg Kosakowski <[email protected]>
exthayek = Mohamed Hayek <[email protected]>
extroewe = Oliver Roewer <[email protected]>
extbauer = Sebastian Bauer <[email protected]>
extli = Dedong Li <[email protected]>
extkunth = Wolfgang Kunther <[email protected]>
extgraup = Bastian Graupner <[email protected]>
extfahrn = Sven Fahrner <[email protected]>
extbeyec = Christof Beyer <[email protected]>
extlee = Youngsoo Lee <[email protected]>
extneset = Kamil Nesetril <[email protected]>
extpicho = Geraldine Pichot <[email protected]>
exthou = Michael Hou <[email protected]>
extbecht = Michel Bechtold <[email protected]>
# extganze = Leohard Ganzer <>
# extgraf = Thomas Graf <>
extjang = Wonyong Jang <[email protected]>
# extruten = Michael Rutenberg <>
extecker = Dominik Eckert <[email protected]>
# exthornb = Goetz Hornbruch <>
extaltep = Peter Alt-Epping <[email protected]>
extengli = Myles English <[email protected]>
exthamid = Nick Hamid <[email protected]>
# extseide = Martin Seidel <>
extkrug = Stefanie Krug <[email protected]>
extnowat = Thomas Nowak <[email protected]>
# extdursi = Jonathan Dursi <>
# extdevri = Luis Manuel de Vries <>
extwuy = Yajie Wu <[email protected]>
# extsoehl = Dennis Soehl <>
extkoldi = Bastian Kolditz <[email protected]>
extschaa = Annika Schaefers <[email protected]>
extpark = Chan-Hee Park <[email protected]>
# extlippm = Johanna Lippmann-Pipke <>
# extichik = Prof. Yasuaki Ichikawa <>
Lars Bilke = Lars Bilke <[email protected]>
Thomas Fischer = Thomas Fischer <[email protected]>
Haibing Shao = Haibing Shao <[email protected]>
Thomas Kalbacher = Thomas Kalbacher <[email protected]>
Olaf Kolditz = Olaf Kolditz <[email protected]>
Dr. Olaf Kolditz = Olaf Kolditz <[email protected]>
Karsten Rink = Karsten Rink <[email protected]>
Norihiro Watanabe = Norihiro Watanabe <[email protected]>
(no author) = no_author <no_author@no_author>
Yanliang Du = Yanliang Du <unknown@email>
Matthias Hess = Matthias Hess <unknown@email>
Martin Beinhorn = Martin Beinhorn <unknown@email>
Cui Chen = Cui Chen <unknown@email>
Chan-Hee Park = Chan-Hee Park <unknown@email>
park = Chan-Hee Park <unknown@email>
Mingliang Xie = Mingliang Xie <unknown@email>
Chris McDermott = Chris McDermott <unknown@email>
Georg Kosakowski = Georg Kosakowski <unknown@email>
Panagiotis Adamidis = Panagiotis Adamidis <unknown@email>
Jan Gronewold = Jan Gronewold <unknown@email>
Robert Walsh = Robert Walsh <unknown@email>
Sebastian Bauer = Sebastian Bauer <unknown@email>
Jens-Olaf Delfs = Jens-Olaf Delfs <unknown@email>
Norbert Boettcher = Norbert Boettcher <[email protected]>
Magdalena Kempa = Magdalena Kempa <unknown@email>
Myles English = Myles English <unknown@email>
Ashok Kumar Singh = Ashok Kumar Singh <unknown@email> 
Ashok Singh = Ashok Kumar Singh <unknown@email> 
Feng Sun = Feng Sun <unknown@email>
Yajie Wu = Yajie Wu <unknown@email>
Marco De Lucia = Marco De Lucia <unknown@email>
Hong Tian = Hong Tian <unknown@email>
Uwe-Jens Goerke = Uwe-Jens Goerke <[email protected]>
Remi Lavergne = Remi Lavergne <unknown@email>
Joshua Taron = Joshua Taron <unknown@email>
nagelt = Thomas Nagel <[email protected]>
waltherm = Marc Walther <[email protected]>
boettche = Norbert Boettcher <[email protected]> 
extpfeif = Unknown <unknown@email>
extmassm = Unknown <unknown@email>
laubeg = Gerrit Laube <[email protected]>
lehmannc = Christoph Lehmann <[email protected]>
Clone this wiki locally