分享

Best general SVN Ignore Pattern?

 daomucun 2011-07-11

What is the best (or as good as possible) general SVN ignore pattern to use?

There are a number of different IDE, editor, compiler, plug-in, platform, etc. specific files and some file types that "overlap" (i.e. desirable for some types projects and not for others).

There are however, a large number of file types that you just never want included in source control automatically regardless the specifics of your development environment.

The answer to this question would serve as a good starting point for any project - only requiring them to add the few environment specific items they need. It could be adapted for other Version Control Systems (VCS) as well.

link|improve this question


12 Answers

up vote 65 down vote accepted

I'll add my own two cents to this question:

I use the following SVN ignore pattern with TortoiseSVN and Subversion CLI for native C++, C#/VB.NET, and PERL projects on both Windows and Linux platforms. It works well for me!

Formatted for copy and paste:

*.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store thumbs.db Thumbs.db *.bak *.class *.exe *.dll *.mine *.obj *.ncb *.lib *.log *.idb *.pdb *.ilk *.msi* .res *.pch *.suo *.exp *.*~ *.~* ~*.* cvs CVS .CVS .cvs release Release debug Debug ignore Ignore bin Bin obj Obj *.csproj.user *.user
            

Formatted for readability:

*.o *.lo *.la #*# .*.rej *.rej
            .*~ *~ .#* .DS_Store thumbs.db
            Thumbs.db *.bak *.class *.exe *.dll
            *.mine *.obj *.ncb *.lib *.log
            *.idb *.pdb *.ilk *.msi* .res *.pch *.suo
            *.exp *.*~ *.~* ~*.* cvs  CVS .CVS .cvs
            release Release debug Debug
            ignore Ignore bin Bin obj  Obj
            *.csproj.user *.user




Based on Burly's ignore pattern, I have added ReSharper to the ignore list

*.o *.lo .la ## .*.rej .rej .~ ~ .# .DS_Store thumbs.db Thumbs.db *.bak *.class *.exe *.dll *.mine *.obj *.ncb *.lib *.log *.idb *.pdb *.ilk .msi .res *.pch *.suo *.exp .~ .~ ~. cvs CVS .CVS .cvs release Release debug Debug ignore Ignore bin Bin obj Obj *.csproj.user *.user _ReSharper.* *.resharper.user

My ignore pattern for Visual Studio:

*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults


The pattern depends on which operating system you're using.

On Linux, you'll want to block *.o, *.so, *.a, and *.la to begin with. You may also want to block *~ (backup file from editing) and #*# (emacs backup from a crash).

On Windows, you'll want *.obj, *.lib, and *.dll at the very least.

Any other files you need to block depend on your IDE, editor, and compiler.





 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多