Configure .gitignore to not upload certain files

Question:

I'm developing a .Net project and would like to add some files to not go up on Github via .gitignore . I started researching and saw some solutions, which I didn't understand.

So first, I can add all obj and bin files to my .gitignore, won't be any problem?

Second, considering the structure:

-Aplication
| -src 
| | - Domain
| | | - bin
| | | - obj

How would I go about ignoring this entire bin folder and the entire obj folder?

Answer:

If .gitignore is at the same level as the Application folder then add this to .gitignore :

Aplication/src/Domain/bin/*
Aplication/src/Domain/obj/*

And save the document, do the git check, this way you should just ignore the contents of the folders.

If you want to ignore content and folders as well, do this:

Aplication/src/Domain/bin/
Aplication/src/Domain/obj/
Scroll to Top