带有 svn 用户名的 git svn dcommit [英] git svn dcommit with svn usernames

查看:25
本文介绍了带有 svn 用户名的 git svn dcommit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在较旧的 subversion 存储库之上使用 git.我们有多个用户在使用新的 git remote (origin/master),它是旧 repo 的 git svn 克隆.问题是当我们执行 git svn dcommit 将更改从新的 git repo 推送到旧的 subversion repo 时,提交者的用户名丢失了,取而代之的是 git svn clone 的用户信息.有没有办法在 dcommit 时将提交者的信息保存到颠覆中?

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?

推荐答案

你可以使用 git-svn 和 --add-author-from--use-log-author.前者在提交信息中的 From: 行中表示 git 作者,后者进行反向转换.

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.

也就是说,存储库格式很重要,而且 subversion 存储库格式比 git 差.它不支持很好的合并,或者提交者与作者或提交时间与推送时间不同.git-svn 本地获取 git ui 是可以的,但是对数据模型做不了太多.希望您能够迁移到 git 存储库,可能带有 svn 前端(现在有 git-svnserver 和 github 的闭源选项).

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).

这篇关于带有 svn 用户名的 git svn dcommit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆