Gitignore syntax
This is an attempt to clarify the syntax speciality for .gitignore
files.
/
: pattern will use the location of the.gitignore
file as root**
: used to make a pattern starting with/
anywhere in the repo*.bin
: ignore all files that end with.bin
build
: ignore all files and directories namedbuild
build/
: ignore all directories namedbuild
/build
: ignore file or directory namedbuild
at the root of the repository/ignore/me
: ignore file or directoryme
in repo root directoryignore
**/ignore/me
: ignore all files and directoriesme
which live in a dirignore