xxxxxxxxxx
Open Visual Studio and the solution needing an ignore file.
1- From the top menu select Git > Settings.
(The above will open Visual Studio’s Options with Source Control > Git Global Settings selected.)
2- From the list on the left select Git Repository Settings
3- Click the Add button for Ignore file.