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
.gitignore file your repository will remain clean:
# Xamarin Build/test output
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: If you already committed files that should be ignored afterwards, git will continue to watch them. Read this post about how you can fix that.