Git does not ignore certain subdirectories

0

I recently started a personal project for practice, and one of the things I wanted to do is to have the "src" folder containing the source of the project, but every time I tried to get some part of this directory to be ignored by git, this would not happen? Does it have to be with the folder name?

    
asked by anonymous 30.09.2016 / 16:27

1 answer

1

Git controls files, not folders! You can test this by creating an empty folder and using the command:

git add *

You will see that it does not add the folder to staging.

Git works with pointers to files. And it's only with the ones you have to worry about, so if you want to ignore all the files in a folder you will have to do a regex:

  

[Bb] in /

It ignores all files (dll, obj, ...) in the Bin folder, starting it with b or B.

Interesting references to .gitignore:

link

link

link

    
01.10.2016 / 22:18