Best general SVN Ignore Pattern?

2019-01-04 04:38发布

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.

17条回答
我只想做你的唯一
2楼-- · 2019-01-04 04:50

Mac users probably want to throw in .DS_Store. In addition, if there are dev's using Emacs or Vim, you probably want to add ~~ and ##.

查看更多
我想做一个坏孩纸
3楼-- · 2019-01-04 04:50

Gotta add Resharper to the mix if you use one.

another one to look out for is Ankh*.*

查看更多
淡お忘
4楼-- · 2019-01-04 04:50

Don't forget NCrunch temporary files:

*.crunchsolution.* *.crunchproject.*
查看更多
甜甜的少女心
5楼-- · 2019-01-04 04:51

Since you may be using third party libs and dll's as part of the project(s) then I don't see the wisdom in blocking *.lib and *.dll from the repository. These are the things that are meant to be stored in the repository.

查看更多
相关推荐>>
6楼-- · 2019-01-04 04:53

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

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 _ReSharper.* *.resharper.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 _ReSharper.* *.resharper.user
查看更多
forever°为你锁心
7楼-- · 2019-01-04 04:53

Every time I come across a file I generally do not want in the repository, I update the pattern. I believe there is no "best" pattern - it always depends on the language and environment you develop in.

Moreover, you're not very likely to think of all the possible "ignorable" filetypes - you'll always encounter a filetype you simply forgot to include. Thats why updating the pattern as you go works the best.

查看更多
登录 后发表回答