1. Ignore folders
If the directory oa.youxi.com is from SVN checkout, add material to the server's local directory, but do not want to add material to version control, so we need to ignore this directory
First use the SVN status command to view the current status
[[Email protected] oa.youxi.com]# SVN status
? Htdocs/admin/adv/material
Add a directory that you want to ignore, which seems to have to enter the directory
[Email protected] oa.youxi.com]# CD htdocs/admin/adv/
[[email protected] adv]# svn propset svn:ignore ' material '.
Property ' Svn:ignore ' Set on '. '
[[email protected] adv]# svn ci-m ' ignore a directory called ' material '. '
Sending ADV
Committed Revision 2.
View status again
[[Email protected] adv]# SVN status
[Email protected] adv]#
Thereafter, no matter how the material directory is modified, it will not be submitted to the warehouse.
2. Submit folder, ignore contents in folder
[[Email protected] adv]# svn propset svn:ignore ' * ' Material
[Email protected] adv]# svn ci-m ' adding "material" and ignore its contents. '
3, if you have created a folder, and added version control, now want to ignore this folder, but to keep the contents of the folder:
[Email protected] adv]# SVN export material material-tmp
[Email protected] adv]# SVN RM material
[Email protected] adv]# svn ci-m ' removing inadvertently added directory "material". '
[Email protected] adv]# MV material-tmp material
[[Email protected] adv]# svn propset svn:ignore ' material '.
[[Email protected] adv]# svn ci-m ' ignoring a directory called ' material '. '
For non-versioned versions, it can be set directly to ignore, but cannot be done for files and directories added to version control. The solution is to first delete the Ignore, the above command is actually this way, but there is the process of exporting and MV.
Linux command line under SVN ignore ignore file or folder usage