output gitignore contents code example
Example 1: gitignore folder
in .gitignore:
folder/
Example 2: gitignore a specific file
$ echo debug.log >> .gitignore $ git rm --cached debug.log rm 'debug.log' $ git commit -m "Start ignoring debug.log"
in .gitignore:
folder/
$ echo debug.log >> .gitignore $ git rm --cached debug.log rm 'debug.log' $ git commit -m "Start ignoring debug.log"