How do I configure the TortoiseSVN 'Global ignore pattern' properly?
Asked Answered
I

5

46

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.

Insignificance answered 8/10, 2008 at 12:30 Comment(0)
A
51

Currently I have the following in my Global Ignore Pattern:

bin obj CVS .cvsignore *.user *.suo Debug Release *.pdb test.* Thumbs.db

Works really well to ignore several hidden or temp files/folders....

So for your specific requirements:

  • Folders: bin obj release compile
  • Files: *.bak *.user *.suo

I would use:

bin obj release compile *.bak *.user *.suo
Alburg answered 8/10, 2008 at 12:34 Comment(1)
I found I had to add additional items for Initial Caps variations, but this works well.Insignificance
E
6

(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#:

global-ignores = *.suo *.user *.userosscache *.sln.docstates *.userprefs debug release Debug Release bin x64 x86 obj Obj *_i.c *_p.c *_i.h *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *.log *.psess *.vsp *.vspx *.sap Thumbs.db _UpgradeReport_Files *.dbmdl

and goes into your

%APPDATA%/Subversion/config

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.

Endospore answered 29/9, 2015 at 15:48 Comment(0)
S
3

If you're using Windows don't you need to use an ignore pattern like this:

*/bin */obj

for directories? And maybe even:

*/bin/* */obj/*

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 )

Skier answered 8/10, 2008 at 12:47 Comment(0)
G
3

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

Godrich answered 28/9, 2012 at 8:59 Comment(0)
P
2

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

Peisch answered 8/10, 2008 at 12:36 Comment(2)
Personally as a web developer I would include image files in source control - they are updated regularly and required in source control to ensure visual version consistencyHarmaning
I would not use dll and pdb, since you would want to commit third party libraries you include in your projects.Quadri

© 2022 - 2024 — McMap. All rights reserved.