Search code examples
gitvisual-studio-2013msysgitazure-devops

VisualStudio doesn't create .gitignore and .gitattributes when adding an existing solution to a repository


Hi I'm new to Git for Windows and Git in general, I'm using Visual Studio with Git For Windows to train on that a little bit.

When you add a new project to a repository, Visual Studio creates two files .gitignore and .gitattributes.

When I add an existing project to the repository, Visual Studio doesn't add those.

Why is that, and how should I add them, as I said I'm new to this, and I don't to miss any step, thx in advance.


Solution

  • Those files are added as part of the initialization of the project.

    If you import one, it is supposed to be already initialized, hence no added files.

    Bit if you miss a good .gitignore, you can look some in GitHub/gitignore or gitignore.io.