Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommended .gitignore file for Visual Studio Xamarin project

Looked around I can't seem to find the recommended template .gitignore file for Visual Studio Xamarin project. I looked here as well https://github.com/github/gitignore

Will the Visual Studio one be ok?

https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

Thx in advance.

like image 476
jasonlam604 Avatar asked Jul 02 '17 04:07

jasonlam604


People also ask

How do I add a Gitignore file to Visual Studio project?

In the Visual Studio, click Git > Settings. This opens the Options window. Navigate to Source Control > Git Repository Settings. In the Git files section, click Add (next to Ignore file).

How do I use Gitignore in Visual Studio?

Open Visual Studio and the solution needing an ignore file. From the top menu select Git > Settings. The above will open Visual Studio's Options with Source Control > Git Global Settings selected. From the list on the left select Git Repository Settings and then click the Add button for Ignore file.

Where should .gitignore be placed?

gitignore file tells Git which files to ignore when committing your project to the GitHub repository. gitignore is located in the root directory of your repo. / will ignore directories with the name.

What is Gitignore in Visual Studio?

gitignore file is that you can commit changes and share it with others. Visual Studio 2019.


2 Answers

You can check gitignore.io for recommended gitignore files. Here is the one it generated for Visual Studio and Xamarin.

like image 104
EarthDragon Avatar answered Oct 23 '22 18:10

EarthDragon


I will use this. It will ignore unnecessary files such as Android Resource.designer.cs and was created by Xamarin.

https://github.com/xamarin/xamarin-forms-samples/blob/master/.gitignore

like image 45
Jaider Avatar answered Oct 23 '22 20:10

Jaider