How to generate an svn-authors-for-git file automatically


If you are using git-svn to interoperate or migrate to git from an svn repository it is a bit irritating having your long git svn fetch repeatedly interrupted by unknown users in your svn repo.

This bash script one liner will get you started with a template file with every user in it already, just tweak their names if you wish.


svn log svn://svnserver -q|grep -v -- ---|cut -d\| -f 2|sort|tr -d ' '|uniq|
   xargs -i echo '{} = {} <{}@example.com>' > /pathto/svn-authors-for-git

git config --global --replace-all svn.authorsfile /pathto/svn-authors-for-git

  1. #1 by Saar Demri on October 30, 2014 - 10:25 am

    Thanks . 🙂

(will not be published)