简体   繁体   English

使用git-svn忽略svn repo中的文件?

[英]Using git-svn to ignore a file just in the svn repo?

I'm new to git-svn and I'm trying to mirror an SVN repo in git. 我是git-svn的新手,我正试图在git中镜像一个SVN repo。 However, I'd like to add a readme.txt file for the git repo (show it shows up in places like github) but ignore that file in the SVN repo. 但是,我想为git repo添加一个readme.txt文件(显示它出现在像github这样的地方),但忽略了SVN repo中的那个文件。 Is that possible without making the mirror process (which is currently a simply bash script doing git-svn rebase and git push) really messy? 如果不进行镜像处理(目前这是一个简单的bash脚本执行git-svn rebase和git push)真的很麻烦吗?

If you have an access to SVN repostiory server, you may just install SubGit into your SVN repository. 如果您可以访问SVN repostiory服务器,则可以将SubGit安装到SVN存储库中。 It is a real professsional Git-SVN mirror, every push to Git is translated to SVN revision, and vice versa. 它是一个真正的专业Git-SVN镜像,每次推送到Git都被翻译成SVN版本,反之亦然。 The translation is concurrent-safe, bidirectional and transparent: svn:ignores are translated to .gitignore, svn:eol-style to .gitattributes "eol" and "text" attributes, SVN tags to Git tags, branches to branches, merges to merges and so on. 转换是并发安全的,双向的和透明的:svn:ignores被转换为.gitignore,svn:eol-style转换为.gitattributes“eol”和“text”属性,SVN标签转换为Git标签,分支转移到分支,合并到合并等等。

If you don't have the access, you may use SmartGit for working with the SVN repository. 如果您没有访问权限,则可以使用SmartGit来处理SVN存储库。 It supports ignores, EOLs, tags and merges translation too. 它支持忽略,EOL,标签和合并翻译。 But it is a personal SVN client, not a bridge. 但它是个人SVN客户端,而不是桥梁。

只需将svn:ignore属性添加到包含与readme.txt文件匹配的模式的父目录中 - 您需要在svn中执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM