SVN status with ignore

Posted under » Version Control on 16 July 2019

SVN status is usefull but sometimes it can get clutterred. Delete what you don't want to see.

It's quite convenient to SVN ADD use wildcards (*) but There are times you regret adding a folder. To cancel an "svn add example_folder" command before committing to the repository, do not use svn delete or svn remove or made-up stuff like undo or cancel. Use the svn revert command:

$ svn revert --recursive example_folder

If you already committed but you want to ignore it, then delete it with a --keep-local option.

$ svn delete --keep-local example_folder

Read more about deleting multiple files.

Try some of this.

$ svn status -u
$ svn status -q
$ svn status -u | grep M

Ignore some directories and files. How this works is that you use the command svn propset to set the property svn:ignore. You give svn:ignore a value, which is a file name pattern. Then, svn will ignore all items in this directory whose name matches the pattern.

$ svn propset svn:ignore *.class ./cache/tmp

Here, you’re telling svn to set the svn:ignore property, and what you want ignored are all files in the current directory (.)/cache/tmp with the extension .class.

If you want svn status to tell you about the ignored files as well, you can do:

$ svn status --no-ignore
More ignore info.

If somehow the above above method does not work, create a file .svnignore at root of the folder.

You can share your awesome svn:ignore settings with everyone else if you use the -F ( --file ) flag.

$ svn propset svn:ignore -F .svnignore .
property 'svn:ignore' set on '.'

With -F , you can specify a file that contains a list of file name patterns to ignore. For example,

bin
gen
proguard
.classpath
.project
local.properties
Thumbs.db
*.apk
*.ap_
*.class
*.dex

Starting from the current directory, it recursively set svn:ignore with all of the patterns listed in .svnignore for each directory.

$ svn propset svn:ignore -R -F .svnignore .

You can commit .svnignore to your repository so that you and/or your team can use it again in the future.

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS data