Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git svn dcommit with svn usernames

Tags:

I'm trying to use git on top of an older subversion repository. We have multiple users working on the new git remote (origin/master) which is a git svn clone of the older repo. The problem is when we do a git svn dcommit to push changes from the new git repo to the old subversion repo, the commiter's username is lost and instead is replaced by the git svn clone'd user's information. Is there a way to preserve the commiter's info into the subversion upon a dcommit?

like image 419
tonycoco Avatar asked Mar 16 '11 15:03

tonycoco


People also ask

Can I use Git and SVN at the same time?

No interaction between them. Just ignore the . git folder for SVN and the . svn folder for Git and you should be fine.

How do I clone a SVN code?

# Clone a repo with standard SVN directory layout (like git clone): git svn clone http://svn.example.com/project --stdlayout --prefix svn/ # Or, if the repo uses a non-standard directory layout: git svn clone http://svn.example.com/project -T tr -b branch -t tag --prefix svn/ # View all branches and tags you have ...


1 Answers

You can use git-svn with --add-author-from and --use-log-author. The former represents the git author in a From: line in the commit message, the latter does the reverse transformation.

That said, repository formats matter, and the subversion repository format is poorer than the git one. It doesn't support merging well, or committers vs authors or commit times distinct from push times. git-svn is OK to get the git ui locally, but it can't do much about the data model. Hopefully you'll be able to migrate to a git repository, possibly with an svn frontend (right now there is git-svnserver and github's closed source option).

like image 141
Tobu Avatar answered Oct 13 '22 03:10

Tobu