1

I'm starting on git environment and I'm a little confuse with .gitignore. I'd like to know which kind of files should be version controlled, because I pushed my project to Bitbucket but when my workmate Pulled It, the Visual Studio couldn't restore some Nu-Get's dlls, generating many problems. Is It normal or not?

João Pedro
  • 429
  • 8
  • 20

1 Answers1

0

https://www.gitignore.io/ is a really good site to get a set up .gitignore file. You can add some frameworks, languages etc and it will generate a basic .gitignore file.

In the end it always depends on your project and setup and how you want to share your code. There is no general solution.

Some ideas:

  • Include everything to make it possible to open the project after a checkout and being able to compile/run/test/debug/deploy
  • Include everything which has an influence on the build result (compiler options, file encodings, settings)
  • Don't include files with absolute paths
  • Dont include own project settings, colors, etc

Consider to have a look at this question and answer too: Visual Studio .gitignore

Community
  • 1
  • 1
NDY
  • 3,527
  • 4
  • 48
  • 63
  • I tried to use .gitignore for VS, but when my workmates pull the project, the VS can't restore things that It should restore normally, like NuGet dlls... So I'd like to know if is a bad practice to push all the project to Git or I'll have problems in the future with something that I don't know yet? – João Pedro Mar 22 '15 at 14:50