开发者

SVN ignore that is local to working copy?

Is there any way that I can ignore a file in my local working copy without polluting the svn properties? I don't want my local ignore pattern (e.g. temp 开发者_StackOverflow中文版files) being published to repository and cause repo having lots of useless information.

Just like in git, I can have .git/info/exclude. Is there any similar way in SVN?


You can put them into the changelist ignore-on-commit. See this question and its answer.

EDIT: This only works with tortoisesvn and possibly other clients, not with svn per se.


Yes there is. Goto TortoiseSvn Setting -> General.

There is a global ignore edit box. Add the following as a good starting point to ignore items you do not want to go into the repository:

*.fbl6 *.fbpInf *.fb6lck *.*scc *.aps *.bak *.cache *.eto *.ilk *.ncb *.obj *.patch *.pch *.plg *.rdl.data *.sbr *.sqlsuo *.suo *.svclog *.tlh *.tli *.tmp *.user *.vshost.* *DXCore.Solution [Bb]in [Dd]ebug [Oo]bj [Rr]elease _[Rr]e[Ss]harper.* _UpgradeReport_Files Ankh.Load Backup* CVS PrecompiledWeb svnignore[.-] [Tt]humbs.db UpgradeLog*.* _vti_* lint.db


This technique is more like .gitignore than .git/info/excludes (Managing svn:ignore with impunity):

  • Create a .svnignore in the top of your project.
  • Make a list of files/wildcards you care to ignore
  • Save it

Now, from the top of your project, you can do:

$ svn propset svn:ignore -F .svnignore  .

At least this way you have to make just 1 propset change.

You'll still have to either track or ignore your .svnignore (just like .gitignore).


If you want to avoid downloading a remote directory completely, the following works:

svn update --set-depth exclude <folder-to-ignore>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜