git 感知但(远程)svn 忽略
我在谷歌代码上有一个公开托管的 svn 存储库,但是由于各种原因,我在本地切换到了 git。我是目前唯一有权访问 googlecode 存储库的开发人员,因此无需进行提取。所有提交都通过 dev 分支,通过 git svn dcommit 到达 svn 的 master 分支。一切都好。现在我的情况是,我在本地有一些文件在 git 的版本控制中,但我不希望它们公开。
所以我有一个想法:我创建一个 private 目录,并将 svn:ignore "private/*" 属性添加到我的 svn 存储库中。但在
git svn dcommmit
我收到错误之后:提交期间合并冲突:文件或目录“。”已经过时了;尝试更新:资源已过时;尝试在 /usr/local/git/libexec/git-core/git-svn 第 574 行更新
我尝试将 svn:ignore 属性导入到 .git/info/exclude 中,但这排除了 git 中“私有”中的所有 git 文件这绝对不是我想要的。
[08-06-2011]
我认为错误不是因为 svn:ignore,似乎 git svn 完全忽略了 svn:ignore,而是由于其他一些未知的原因。问题变成:是否可以以与使用 --ignore-path 从 git svn fetch
排除路径相同的方式从 git svn dcommit 中排除路径
I have a publicly hosted svn repository on google code, however locally I switched to git because of various reasons. I'm currently the only developer with access to the googlecode repo so no need to do fetches. All commits go via a dev branch, to the master branch to svn, with git svn dcommit
. All well. Now i'm in the situation that I've some files locally in version control with git, but I do not EVER want them to make public available.
So I had an idea: I create a directory private and add a svn:ignore "private/*" property to my svn repo. But than after
git svn dcommmit
I get an error: Merge conflict during commit: File or directory '.' is out of date; try updating: resource out of date; try updating at /usr/local/git/libexec/git-core/git-svn line 574
I tried importing the svn:ignore property into .git/info/exclude but that excludes all my git files in the 'private' from git which is definitely not what I want.
[08-06-2011]
I think the error is not because of the svn:ignore, it seems that git svn completely ignore the svn:ignore, but due to some other yet unknown reason. The question becomes: is it possible to exclude paths from git svn dcommit
in the same way as it is possible to exclude paths from git svn fetch
with --ignore-path
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
git-svn 手册 页面表明可以使用以下配置键来实现:
The git-svn man page indicates this is possible with the following config key:
git-svn 会忽略 svn:ignore 但如果您使用 SmartGit 签出存储库,则 SmartGit 不会忽略。它将其转换为相应的 .gitignore 文件,反之亦然。
所以我建议你使用 SmartGit 而不是 git-svn。
git-svn ignores svn:ignore but SmartGit doesn't if you checkout your repository using SmartGit. It converts it to corresponding .gitignore files and vice versa.
So I would recommend you to use SmartGit instead of git-svn.