如何从 SVN 获取所有未版本控制文件的列表? [英] How do I get a list of all unversioned files from SVN?
问题描述
有时您在开发时决定提交,却忘记在项目中创建了一些文件.然后几天后,您的好友将您的构建从 Subversion 中删除,并抱怨某些文件似乎丢失了.你意识到了,糟糕,我忘记添加那些文件了!
Sometimes you're developing and you decide to commit, forgetting you created a few files on your project. Then a few days down the line your buddy gets your build out of Subversion and complains that some files appear to be missing. You realize, ah crap, I forgot to add those files!
如何从 Subversion 获取不受版本控制的文件列表,以便确定我已将所有内容添加到存储库中?
How can I get a list of the files that are not under version control from Subversion so I'm sure I've added everything to the repository?
推荐答案
使用 svn status
命令:
Use the svn status
command:
svn status | grep ^?
未版本化的文件用 ?在行首.
Files that are not versioned are indicated with a ? at the start of the line.
如果你发现你总是有一些特定的文件不应该添加到存储库中(例如,生成的二进制文件),你应该设置 svn:ignore
包含目录上的属性,因此这些文件在使用 svn status 时不会一直显示代码>.
If you find that you always have some specific files that should not be added to the repository (for example, generated binaries), you should set up the svn:ignore
property on the containing directory so these files won't keep showing up when using svn status
.
这篇关于如何从 SVN 获取所有未版本控制文件的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!