Make Git ignore PublishProfile for WebDeploy in Visual Studio
Asked Answered
R

1

9

I host ASP.NET MVC app on Azure so I use WebDeploy. There is a folder with my Publish Profile which include AppName Web Deploy.pubxml which include password for db. So if I pushed changes to Github everyone would be able to see my db password.

I use Git extension for Visual Studio and I want to "untrack" this folder. How can I do this?

Retrogress answered 15/2, 2018 at 1:24 Comment(0)
B
19

If as a general rule, you would like to ignore the publish profiles from being committed, then add the following lines to the .gitignore file of your solution

*.[Pp]ublish.xml
*.azurePubxml
*.pubxml
*.publishproj

On the other hand, it may be worthwhile to spend some time removing database config from publish profile by using Web Deploy Parameters and setting up a small release cycle to avoid publishing directly from VS.

Brachial answered 15/2, 2018 at 8:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.