How do I ignore a directory with SVN?

前端 未结 23 2338
无人共我
无人共我 2020-11-22 16:42

I just started using SVN, and I have a cache directory that I don\'t need under source control. How can I ignore the whole directory/folder with SVN?

I am using Vers

23条回答
  •  囚心锁ツ
    2020-11-22 17:35

    Here's an example directory structure:

    \project
        \source
        \cache
        \other
    

    When in project you see that your cache directory is not added and shows up as such.

    > svn st
    M  source
    ?  cache
    

    To set the ignore property, do

    svn propset svn:ignore cache .

    where svn:ignore is the name of the property you're setting, cache is the value of the property, and . is the directory you're setting this property on. It should be the parent directory of the cache directory that needs the property.

    To check what properties are set:

    > svn proplist
    Properties on '.':
      svn:ignore
    

    To see the value of svn:ignore:

    > svn propget svn:ignore
    cache
    

    To delete properties previously set:

    svn propdel svn:ignore
    

提交回复
热议问题