If you use git as source control for your Xamarin project, you might not want everything but only the necessary files to be commited. Unfortunately most auto-generated
.gitignore files like the one from GitHub for example don’t contain Xamarin paths. By adding these lines to your
.gitignorefile your repository will remain clean:
<code class="language-markup"> # Xamarin Build/test output [Bb]in/ [Oo]bj/ test-results Components/* .DS_Store
obj folders (both with upper or lower case) contain compiled stuff and do not need to be checked into your repository. Same is with the
test-results. Inside the
Components folder you can find downloaded Xamarin components that you loaded from the component store. You do not need to check them in, because a reference to the components is included in your project file and everytime you build, the systems checks if they already have been downloaded or not. If you work on a Mac, make sure to ignore hidden the Mac resourece folder
Remember: Ifyou already committed files that should be ignored afterwards, git will continue to watch them. Readthis postabout how you can fix that.