Recently I\’ve installed Visual Studio extension – Favorite Documents. I\’m working daily with big solution, where I often need to run certain T4 templates and that it\’s just pain… So I tought I should give it a go.

What I noticed, is that the extension creates file in solution directory named $(SolutionName).favdoc where it stores all favorite documents, and that file poped rigth in my git staging area. Ofcourse this file doesn\’t belong in source control. So what to do with that?

One method would be to add .favdoc extension into repository .gitignore, but I don’t beleive this is the right approach.

Instead I’ve added the .favdoc extension inside global gitignore.

First I’ve created gitignore file itself inside my user direcotory(C:\Users\myUsername) with simple powershell command

then I had to tell git where to look for that file.

Finally I\’ve opened ~/.gitignore_global and added few lines to ignore that *.favdoc extension.

Here is a list of common gitignore configurations.

Last modified: February 4, 2022
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments