What's the difference between **/foo and foo in a .gitignore file?

21 Views Asked by At

Are **/foo and foo in a .gitignore file synonyms?

For example, do these two lines do the same?

**/.DS_Store
.DS_Store

A leading ** followed by a slash means match in all directories. For example, **/foo matches file or directory "foo" anywhere, the same as pattern "foo".

Source: https://git-scm.com/docs/gitignore#_pattern_format

0

There are 0 best solutions below