Ignoring a subfolder with gitignore

1

How to ignore a subfolder with gitignore? in my case only the subfolder / vendor

My structure

  

/

     

/ systema / vendor

My git is in the design range my gitignore too

!systema/
systema/vendor/*

I tried to do this but git ignores my system folder.

    
asked by anonymous 16.01.2018 / 18:25

1 answer

2

Create a .gitignore within the / system / directory and put the code below:

 [^.]*

So you will be ignoring all files and subfolders;

To ignore only the / system / vendor / folder add the code below;

/systema/vendor/

or

Create .gitignore within the / system / vendor / directory add the following code:

[^.*]
    
16.01.2018 / 18:28