A slash in the beginning or middle of a gitignore pattern causes the
pattern to match only relative to the directory of the .gitignore
file1. This means that the 'Cargo.lock' and 'target' patterns were
not matching anything and the build pattern was only matching the top
level build.
A slash in the beginning or middle of a gitignore pattern causes the pattern to match only relative to the directory of the .gitignore file1. This means that the 'Cargo.lock' and 'target' patterns were not matching anything and the build pattern was only matching the top level build.