Linux command line under SVN ignore ignore file or folder usage

Source: Internet
Author: User
Tags svn

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.