0

I have Visual C++ project on disc:

project_name.sln
/project_name/project_name.vcxproj
/project_name/Debug
/project_name/Release

.gitignore is placed in in the same directory like project_name.sln. Hot to tell .gitignore not include /project_name/Debug and /project_name/Release in universal way - without defining project_name/ directory?

Imran Ali
  • 2,177
  • 1
  • 26
  • 37
vico
  • 15,367
  • 39
  • 141
  • 262
  • Possible duplicate of [.gitignore for Visual Studio Projects and Solutions](http://stackoverflow.com/questions/2143956/gitignore-for-visual-studio-projects-and-solutions) – Shmulik Klein Dec 11 '16 at 16:36

1 Answers1

1

Try gitignore.io it can generates .gitignore for various scenarios. Then, point git configuration's core.excludesfile to point the generated .gitignore file.

git config --global core.excludesfile 'GIT_IGNORE_PATH/.gitignore'

Shmulik Klein
  • 3,429
  • 16
  • 33