问题描述
我正在尝试在较旧的Subversion存储库之上使用git.我们有多个用户正在使用新的git remote(源/主服务器),它是旧仓库的git svn克隆.问题是,当我们执行git svn dcommit将更改从新的git repo推送到旧的subversion仓库时,提交者的用户名将丢失,而是由git svn克隆的用户信息代替.有没有一种方法可以在dcommit时将提交者的信息保存到Subversion中?
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).
这篇关于git svn使用svn用户名dcommit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!