Svn ignore files

I am trying to ignore the img/test.jpg , followed by SVN. Tell me this question. I tried the command:

 svn propset svn:ignore "img/test.jpg" . 

Instead of ignoring img/test.jpg SVN tells me the property 'svn:ignore' set on '.' .

In addition, when I do svn status , I get an extra line:

  M . 

How can SVN ignore a file?

+6
source share
2 answers

Despite the confusing output, your team is working correctly. Line

 M . 

... indicates that you set the property in the current directory (the one from which you ran the command). The path is ignored ./img/test.jpg , but the property is set in the current directory, and not in a specific file. It has a modified M flag, because you still need to pass the property back to the repository. After you do this, subsequent checks or other employees working on this codebase after svn update will also receive the svn:ignore property in this file.

Note. To change or remove this using svn propdel , you will also need to do this from the current directory:

 svn propdel svn:ignore . 

You could also cd 'ed into the img/ directory and run propset there, in which case it would be bound to that directory, and not to its parent. Your commit will look something like this:

 M img 
+10
source

You should set the property in the img directory and not in the root directory:

 svn propset svn:ignore "test.jpg" img 
-1
source

Source: https://habr.com/ru/post/917011/


All Articles