I'm trying to make subversion ignore a folder, so I did from the parent folder:
svn propset svn:ignore folder-to-ignore .
but the svn st
is still listing the files within that folder with a "?" (not on version control).
I want to ignore the folder itself (which is on version control), as there are always new files inside it.
Any ide开发者_C百科a how to proceed?
I have struggled with the same problem and learned that the the command must be run in the parent folder and that the ignored directory can not be a sub directory. Assume I have the following structure and wish to ignore virtualenv:
project/
project/.svn/
project/trunk/
project/trunk/virtualenv/
When in the project
folder the following will not work as expected:
svn propset svn:ignore trunk/virtualenv .
However the following will work:
cd trunk
svn propset svn:ignore virtualenv .
OR
svn propset svn:ignore virtualenv trunk/
This is actually the expected behaviour, see http://svnbook.red-bean.com/en/1.1/ch07s02.html and search for ignore information.
Note: If the folder was already tracked you can untrack it with svn remove <FOLDER> --keep-local
If the folder (or a file) is already in version control, it cannot be ignored. But you can ignore all files inside that folder — just set the svn:ignore
property on that folder instead:
svn propset svn:ignore "*" folder-to-ignore
The folder itself will still be tracked (and created on a new checkout).
精彩评论