`git help ignore` has this to say about trailing slashes: > If the pattern ends with a slash, it is removed for the purpose of > the following description, but it would only find a match with a > directory. In other words, foo/ will match a directory foo and > paths underneath it, but will not match a regular file or a > symbolic link foo (this is consistent with the way how pathspec > works in general in Git). Sure enough, having manually performed the same steps as this test, `git status` tells us the following: # On branch master # # Initial commit # # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: force.txt # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # ../.gitignore # child1/ # child2/ i.e. neither child1 nor child2 is ignored.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| attr | Loading commit data... | |
| blame | Loading commit data... | |
| buf | Loading commit data... | |
| checkout | Loading commit data... | |
| cherrypick | Loading commit data... | |
| clar | Loading commit data... | |
| clone | Loading commit data... | |
| commit | Loading commit data... | |
| config | Loading commit data... | |
| core | Loading commit data... | |
| date | Loading commit data... | |
| diff | Loading commit data... | |
| fetchhead | Loading commit data... | |
| filter | Loading commit data... | |
| graph | Loading commit data... | |
| index | Loading commit data... | |
| merge | Loading commit data... | |
| network | Loading commit data... | |
| notes | Loading commit data... | |
| object | Loading commit data... | |
| odb | Loading commit data... | |
| online | Loading commit data... | |
| pack | Loading commit data... | |
| refs | Loading commit data... | |
| repo | Loading commit data... | |
| reset | Loading commit data... | |
| resources | Loading commit data... | |
| revert | Loading commit data... | |
| revwalk | Loading commit data... | |
| stash | Loading commit data... | |
| status | Loading commit data... | |
| stress | Loading commit data... | |
| structinit | Loading commit data... | |
| submodule | Loading commit data... | |
| threads | Loading commit data... | |
| trace | Loading commit data... | |
| README.md | Loading commit data... | |
| clar.c | Loading commit data... | |
| clar.h | Loading commit data... | |
| clar_libgit2.c | Loading commit data... | |
| clar_libgit2.h | Loading commit data... | |
| generate.py | Loading commit data... | |
| main.c | Loading commit data... | |
| valgrind-supp-mac.txt | Loading commit data... |