如何在 TortoiseSVN 中取消忽略文件?

我错误地忽略了 TortoiseSVN 中的一个文件。如何逆转这个错误并将该文件添加到我的存储库中?

67322 次浏览

If you right click on the directory containing the file and select SVN Properties, you should see an svn:ignore property with a list of ignored files. Simply edit that list and remove the rule ignoring your file.

Just edit the svn:ignore property (in the subversion tab of the directory properties). (If you ignored a subfolder, select the property tab of it's parent folder)

"Ignoring Files And Directories" from the Tortoise SVN documentation states:

If you want to remove one or more items from the ignore list, right click on those items and select TortoiseSVNRemove from Ignore List You can also access a folder's svn:ignore property directly. That allows you to specify more general patterns using filename globbing, described in the section below. Read the section called “Project Settings” for more information on setting properties directly. Please be aware that each ignore pattern has to be placed on a separate line. Separating them by spaces does not work.

I usually just add the ignored file with Tortoise and don't bother to remove the entry from the ignore list. so far I had no negative side effect...

For me, the solution was to use "Update to Revision".

My ignored files had been set as ignored automatically when I did a checkout but had not put a checkmark by the files.

When I did Update to Revision, I verified that the files were to be included by going to "Chose Items..."

I was not able to find anything in the properties menu that listed ignored files (a la Gabriel's suggestion). In fact, the properties were empty.

In my case there was another problem: the global ignore list in tortoise Settings, General.

Tortoise ships by default with .so files in the ignore list and we store these in source control (yes I know this is far from ideal). Removing them from the list sorted it out for me.