如何配置 TortoiseSVN“全局忽略模式”? 适当地?
我希望 TortoiseSVN (1.5.3) 忽略某些文件夹、它们的内容和某些其他文件,无论它们出现在我的目录层次结构中,但我无法正确获取全局忽略字符串。
无论我做什么,它要么增加太多,要么忽略太多
要忽略的正确“全局忽略模式”是什么......
Folders : bin obj release compile
Files : *.bak *.user *.suo
更新:为了帮助澄清......是的,我在 Windows 上使用它。
I would like TortoiseSVN (1.5.3) to ignore certain folders, their contents and certain other files wherever they might appear in my directory hierarchy but I cannot get the global ignore string right.
Whatever I do, it either adds to much or ignores too much
What is the correct 'Global ignore pattern' to ignore....
Folders : bin obj release compile
Files : *.bak *.user *.suo
Update: To help clarify... yes I am using this on windows.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
目前,我的全局忽略模式中有以下内容:
非常适合忽略几个隐藏或临时文件/文件夹....
因此,根据您的具体要求:
bin objreleasecompile
*.bak *.user *.suo
我会使用:
Currently I have the following in my Global Ignore Pattern:
Works really well to ignore several hidden or temp files/folders....
So for your specific requirements:
bin obj release compile
*.bak *.user *.suo
I would use:
(添加到一个老问题..)
这主要取决于您的语言。 所以这里已经有一些适用于 VB6 和其他版本的版本。
这是针对 Visual Studio 和 Visual Studio 的。 C#:
并进入您的
文件。 如果您像我一样有一个新的config文件,您只会找到被注释掉的global-ignore条目,因此您可以附加该行。
它主要取自 gitignore https://github.com/github/gitignore /blob/master/VisualStudio.gitignore 。
任何语言的一般情况
基本上,通过谷歌搜索(或者如果你愿意的话)“gitignore(语言或工具)”你会找到示例 gitignore 文件,语法类似于 SVN 的 global-ignore,你只需要进行一些编辑(对于 SVN,所有条目都在一行中;对于 GIT,每个条目都在新行中)。
一个好的文本编辑器,例如 Sublime 或 Notepad++ 在转换时有很大帮助。
(Adding to an old question..)
It depends mainly on your language. So there are some versions here already for VB6 and others.
This is for Visual Studio & C#:
and goes into your
file. If you have a fresh config file, like me, you will only find global-ignore entries that are commented out, so you can append the line.
It is take mainly from the gitignore at https://github.com/github/gitignore/blob/master/VisualStudio.gitignore .
General case for any language
Basically, googling (or binging, if you so desire) for "gitignore (language or tool)" you will find sample gitignore files, the syntax is similar to the global-ignore of SVN, you just need to do some editing (all entries in one line for SVN, each entry in new line for GIT).
A good text editor like Sublime or Notepad++ helps a lot when converting.
如果您使用的是 Windows,您不需要使用如下所示的忽略模式:
*/bin */obj
目录? 甚至可能:
我必须承认,我只是在犯了错误的事情之后才意识到这一点,所以我还没有“现场”尝试过这一点。 请注意目录模式中正斜杠的使用。
(来源请参阅此链接:
http://svn.haxx.se/tsvnusers/archive-2007- 03/0281.shtml
)
If you're using Windows don't you need to use an ignore pattern like this:
*/bin */obj
for directories? And maybe even:
I must admit I only realised this after I had committed the wrong things, so I haven't tried this out 'live'. Notice the use of the forward slashes in the directory pattern.
(See this link for the source:
http://svn.haxx.se/tsvnusers/archive-2007-03/0281.shtml
)
请注意,使用 subversion 1.7+ 不需要全局忽略列表中的路径(%appdata%\subversion\config 文件中的 global-ignores 行)。 请参阅http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn- dug-ignore.html
因此,要忽略所有项目中的 bin 和 obj 目录:
全局忽略 = bin obj
Please be aware that using the subversion 1.7+ does not expect paths in the Global Ignore List (the global-ignores line in the %appdata%\subversion\config file). See http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-ignore.html
So, to ignore bin and obj directories in all projects:
global-ignores = bin obj
这是我用于 .NET 的一个。 请注意,我使用 VB6 以及其他软件包,因此有额外的条目。 而且它区分大小写。
*.chm *.dat *.dll *.ini *.err *.exe *.DLL *.INI *.ERR *.EXE *.backup *.zip *.ZIP *.vbw *.scc *.vbg *。日志 *.exp *.lib .vrs.SCC *.PRF *.prf *.NIP *.NOP *.nip *.nop *.out *.bjob *.job *.prt *。 tmp *.txt *.EX_ *.ex_ *.MDP *.bak *.BAK *.CFG *.cfg *.TXT *.vrs *.VRS *.scc *.SCC *.vsc *.VSC *.mdb * .MDB *.cur *.oca *.setup *.png *.suo *.user Debug Release bin *.pdb *.trx TestResults *.WS~ *.ocx
这三个被证明对于大大减少文件通配符的数量至关重要不得不追踪。
调试发布bin
This is one I use for .NET. Note that I use VB6 as well as other packages so there are extra entries. Also it is case sensitive.
*.chm *.dat *.dll *.ini *.err *.exe *.DLL *.INI *.ERR *.EXE *.backup *.zip *.ZIP *.vbw *.scc *.vbg *.log *.exp *.lib .vrs.SCC *.PRF *.prf *.NIP *.NOP *.nip *.nop *.out *.bjob *.job *.prt *.tmp *.txt *.EX_ *.ex_ *.MDP *.bak *.BAK *.CFG *.cfg *.TXT *.vrs *.VRS *.scc *.SCC *.vsc *.VSC *.mdb *.MDB *.cur *.oca *.setup *.png *.suo *.user Debug Release bin *.pdb *.trx TestResults *.WS~ *.ocx
These three proved critical in greatly reducing the number of files wildcards I had to track down.
Debug Release bin