Let's say I want to set the svn:ignore property for directory dir1 with multiple values, file1, file2, and file3. How can I do this via command line, without using a text editor (to set the property value)?
Use the following command to create a list not under version control files. Then edit the file to leave just the files you want actually to ignore. Then use this one to ignore the files listed in the file: svn propset svn:ignore -F ignoring.
You could add bin folder to ignore list. Right click on the bin folder -> TortoiseSVN -> Unversion and add to ignore list -> bin.
To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…
Type exactly like here with line breaks:
svn propset svn:ignore "file1
file2
file3" dir1
If you want to pass a list from another command, try xargs
.
Unfortunately, the svn command doesn't allow reading from stdin
with -F -
.
One line solution:
svn propset svn:ignore "file1"$'\n'"file2"$'\n'"file3" dir1
Adding multiple entries is much easier. Use the following command:
svn propedit svn:ignore .
This will open a text editor. Now you can add multiple entries easily.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With