How to ignore files on Visual Studio Team Services

2019-08-04 04:43发布

I want to ignore files on Team Services version like web.config or app.config. Because they are related with user and local db's. So I wanna ignore them when I check in all solution. I searched little bit but all informations are about local servers. So I can't apply this solutions.

2条回答
姐就是有狂的资本
2楼-- · 2019-08-04 05:08

For newer versions of TFS (which includes VS Online), the preferred approach is to use a .tfignore file.

You simply check-in a .tfignore file and TFS uses that to determine which files/paths/extensions/etc to ignore and not include in TFS.

You can read more about tfignore files here: http://msdn.microsoft.com/en-us/library/ms245454.aspx#tfignore

查看更多
欢心
3楼-- · 2019-08-04 05:11

Simply add files to store details outside of web.config and then Undo the Include in the Pending Checkins, original answer here: https://stackoverflow.com/a/3883663/585248

This answer relates to having exclusive checkouts ... if you use Local Sever then you can use ignore files. Exclusive checkouts you would need to set it to Server and try the solution from the link above. Tested and works.

查看更多
登录 后发表回答