Add every new file to svn except those that are ignored

I am new to subversion. I created a repository and I want to make the first commit.

There are files and folders that should not be checked, for example cache/ or log/ . I used svn propset svn:ignore -F svn_ignore.txt .

I want to have an easy way to add new files to svn. Is there a way to do this while respecting the svn: ignore setting? The following commands add every file, even ignored ones:

 svn add --force . alias svn_add_all='svn st|grep ^?|sed s/?//|xargs svn add $1' 

EDIT Here I get:

 $ svn status ? web/images/test/film_super8.jpg ? web/images/test/ea_dl_manager.jpg ? web/images/test/minecraft_anaglyph.png $ svn propget svn:ignore cache/* log/* web/images/blog/* web/images/test/* 
+4
source share
2 answers

Templates are strictly for this directory - they do not translate recursively into subdirectories.

See SVN Documentation

Thus, you should apply templates in all directories or only in those directories where this ignoring is necessary.

Therefore, the template should not include directories like you. web/images/blog/* will not work. You must go to the blog folder and set svn:ignore to *

Some clients have an Apply Recursively feature that does this for you. I do not know if you can do this with the default client.
But in your case it would be useless. It can be used when it is necessary to ignore a specific file or template (for example, *.suo files for Visual Studio projects)

+3
source

svn status should not display an ignored file.
But the problem may be how you ignore the file: see " svn command line: ignore file "

You are not an svn:ignore file.

You put the svn:ignore property in a directory to ignore this file name pattern!

 # Add just the single file to the current directories ignore list (like above) # Note the dot at the end of the command is important svn propset svn:ignore secret.txt . # See that things worked svn propget svn:ignore . # Notice the single file was added to the list svn status --no-ignore # You should see an 'I' next to the ignored files 
+2
source

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


All Articles