how to add directory to gitignore code example
Example 1: create gitignore
$ touch .gitignore
Example 2: how to create gitignore
node_modules/
someOtherfoler/
*.com
*.class
*.dll
*.exe
*.o
*.so
*.so
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
Example 3: what to add to gitignore
Look at this awesome site!
https://www.toptal.com/developers/gitignore
Generates a gitignore for you, based on the technologies you're using
Example 4: git exclude folder
directory_to_exclude/
Example 5: gitignore all log files
*.log
!spec/*.log