0

I'm trying to keep my passwords out of config by splitting them into .secrets files. In order to make this work with normal Visual Studio projects (non-website) the .secrets files need to be in the output folder. So to make sure they will be copied, they need to be in the build and added to the project.

When I include one of these files it automatically gets added to source control. Even if they should have been ignored by the .gitignore.

*.secrets
**/secrets
Community
  • 1
  • 1
MrFox
  • 4,852
  • 7
  • 45
  • 81
  • Are the files named `dir/.secrets` or are they named `dir/file.secrets`? (Or some other pattern entirely?) To match the latter, regardless of how many levels of directory, you would need `**/*.secrets`. – torek Mar 08 '17 at 11:05
  • Maybe [this question](http://stackoverflow.com/questions/936249/how-to-stop-tracking-and-ignore-changes-to-a-file-in-git?rq=1) will help you. And the recommend command is `git update-index --assume-unchanged [path]`, which will keep the file in the repo but not track the change anymore. – shuizhongyuemin Mar 09 '17 at 06:30

0 Answers0