排除git中的.svn文件夹 [英] Exclude .svn folders within git
问题描述
我试图排除subversion的文件夹被git跟踪。我尝试了两种不同的.git / info / exclude设置,但它似乎不起作用。我会用git-svn,但是请求访问来让它工作是一件痛苦的事情,所以我宁愿只是通过排除文件夹来解决这个问题。
我想要排除.svn / entries
我已经尝试在.git / info / exlude中添加以下行:
.svn
条目
.svn /条目
条目
svn
无论如何当我运行git status时出现.svn条目
我想你想在.gitignore文件中使用.gitignore文件您的顶级目录。如果将.svn / entries放在该文件的一行中,这将起作用。您可能只需要输入.svn而不是.svn / entries。
编辑:查看评论。如果他们的文件已经被git跟踪,他们将总是显示在 git status
中。
I'm trying to exclude subversion's folders from being tracked by git. I tried a couple different setups for .git/info/exclude, but it doesn't seem to work. I would use git-svn, but it's a pain to request access to get that to work, so I'd rather just work around this by excluding the folders.
I want to exclude ".svn/entries"
I've tried adding the following lines to .git/info/exlude: .svn entries .svn/entries entries svn
No matter what I try, .svn entries shows up when I run git status
I think you want to use a .gitignore file in your top-level directory. This will work if you put ".svn/entries" on a line in that file. You might just put ".svn" instead of ".svn/entries" as well.
EDIT: See comments. If they files are already being tracked by git, they'll always show up in git status
.
这篇关于排除git中的.svn文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!