.gitignore
.gitignoreLoading…

Ignore patterns

One pattern per line. Changes save automatically; Ctrl/Cmd+S saves immediately. These rules affect untracked files. Already tracked files remain tracked.

Paths use /, including on Windows. Rules apply below the directory containing this file. ../ and ../../ cannot target parents or siblings; put those rules in an ancestor’s .gitignore instead.

*.log
Names ending in .log at any depth below this file.
/build/
Only the build directory beside this file.
build/
Directories named build at any depth below this file.
*/
All directories below this file, excluding their contents too.
src/*
Immediate children of src. A matched directory excludes its contents too.
src/**/temp/
Temp directories under src, through zero or more intervening directories.
logs/**
Everything inside logs, recursively.
file?.[ch]
? matches one character; [ch] matches c or h. * and ? never cross a slash.
!keep.log
Re-include a match. Its parent directory must also be included. The last matching rule in this file wins.
# explanation
Comment. Blank lines separate groups.
\#literal · \!literal
Escape a leading # or ! to match it literally. Trailing spaces are ignored unless escaped with a backslash.

Keep one file in a directory

/logs/*
!/logs/keep.log

Nested .gitignore files can override ancestor rules within their own subtree. Ignoring a directory prevents Git from looking inside it for exceptions.

Reference: git-scm.com/docs/gitignore

Discard your unsaved edits?