How do I ignore files in Subversion?

2019-01-01 02:33发布

How do I ignore files in Subversion?

Also, how do I find files which are not under version control?

标签: svn command
17条回答
刘海飞了
2楼-- · 2019-01-01 03:12

I found the article .svnignore Example for Java.

Example: .svnignore for Ruby on Rails,

/log

/public/*.JPEG
/public/*.jpeg
/public/*.png
/public/*.gif

*.*~

And after that:

svn propset svn:ignore -F .svnignore .

Examples for .gitignore. You can use for your .svnignore

https://github.com/github/gitignore

查看更多
初与友歌
3楼-- · 2019-01-01 03:13

Use the following command to create a list not under version control files.

svn status | grep "^\?" | awk "{print \$2}" > ignoring.txt

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.txt .

Note the dot at the end of the line. It tells SVN that the property is being set on the current directory.

Delete the file:

rm ignoring.txt

Finally commit,

svn ci --message "ignoring some files"

You can then check which files are ignored via:

svn proplist -v
查看更多
梦该遗忘
4楼-- · 2019-01-01 03:16
  1. open you use JetBrains Product(i.e. Pycharm)
  2. then click the 'commit' button on the top toolbar or use shortcut 'ctrl + k' screenshot_toolbar
  3. on the commit interface, move your unwanted files to another change list as follows. screenshot_commit_change
  4. next time you can only commit default change list.
查看更多
ら面具成の殇う
5楼-- · 2019-01-01 03:17

You can also set a global ignore pattern in SVN's configuration file.

查看更多
裙下三千臣
6楼-- · 2019-01-01 03:18

Adding a directory to subversion, and ignoring the directory contents

svn propset svn:ignore '\*.*' .

or

svn propset svn:ignore '*' .
查看更多
笑指拈花
7楼-- · 2019-01-01 03:20

svn status will tell you which files are not in SVN, as well as what's changed.

Look at the SVN properties for the ignore property.

For all things SVN, the Red Book is required reading.

查看更多
登录 后发表回答