Which file should be added to .gitignore ?

Hello,

I’m on Linux, and I followed the installation method provide by this topic.

As I understand so far, the git add-in was disable because of some bugs, so the .gitignore file has to be filled by hand.

I copy-pasted the .gitignore file provided by github for Visual Studio that include some files related to MonoDevelop/XamarinStudio

Now I would like to know if I should add some files created by the monogame template. I would say yes for dylib files (the dll files are in x64 or x86 directory which are already ignored).
But what for MonoGame.Framework.dll.config ? I think that file maps dll files to their equivalent linux/OSX libraries. It seems user specific and the libraries are ignored.

So, in addition of the gitignore for VS, I should add

*.dylib
ProjectDirectory/MonoGame.Framework.dll.config

I would like to know if over git user uses the same gitignore or not (and why if it’s possible)

Thanks

You should not add those files to your .gitignore.
For the Mac dylib and the x64 and x86 folders, it does not matter. Those are added as a link, meaning they don’t really exist at the location you see them at, but the .csproj links them there from your MonoGame installation folder. Since they’re not actually in the location on your filesystem git will not see them.

The .dll.config file is not user specific and it will cause issues if you share the project and do not put it in version control. The libraries that it points to are the ones that are included in your project, so they are always at the same relative location.

It was disabled because it depends on your distribution having 2 outdated libs installed.

As for the question on how your gitignore should look, well it should look like: https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

So, the file provided by github is enough and i should not ignore files created by the template.

Thanks a lot :slight_smile:

1 Like