git-svn SVN作者文件的相对路径? [英] Relative paths for git-svn SVN authors file?

查看:153
本文介绍了git-svn SVN作者文件的相对路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用git-svn克隆了一个SVN仓库。在最初的克隆过程中,我提供了一个SVN作者文件。当我完成初始化克隆时,git将 authorsfile 设置为绝对路径。但是,我将这个git存储库的副本保存在工作机器和笔记本电脑上,并使用 unison (它们不是两个不同的克隆,但是是相同的克隆)。

我的git存储库的路径在工作机器上是不同的,笔记本电脑,这意味着作者文件不会在工作机器上找到,绝对路径无效。请问git-svn接受 authorsfile 的相对路径,以便始终找到作者文件,并且我可以安全地运行 git svn rebase 和 git snv dcommit 来自任一台机器?

解决方案


当我完成初始化克隆时,git将authorsfile设置为绝对路径。


您可以将其更改为相对路径。如果您在vim或任何文本编辑器中打开 .git / config 文件,您可以相对于 .git 文件夹编辑它。



通过这样做,您应该可以在所有机器中使用相同的作者文件。


I have cloned an SVN repository from work using git-svn. During the initial cloning, I provided an SVN authors file. When I did the initial clone, git set the authorsfile as an absolute path. However, I keep copies of this git repository on a work machine and a laptop, and keep the copies in sync using unison (they are not two different clones, but the same clone).

The paths to my git repository are different on the work machine and the laptop, which means that the authors file won't be found on the work machine, where the absolute path is invalid. Will git-svn accept a relative path for the authorsfile, instead, so that the authors file will always be found and I can safely run git svn rebase and git snv dcommit from either machine?

解决方案

When I did the initial clone, git set the authorsfile as an absolute path.

You can change it to a relative path. If you open .git/config file in vim or any text editor you can edit it relative to the .git folder.

By doing this this should allow you to use the same authors file in all your machine.

这篇关于git-svn SVN作者文件的相对路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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