Cargo: Error in .gitignore

Created on 28 May 2018  ·  3Comments  ·  Source: rust-lang/cargo

first line of .gitignore, created by cargo new, should be
target/

instead of

/target

Most helpful comment

Technically it should be /target/, but either works.

All 3 comments

Hm, I think this is the intended behavior: with /target, we'll ignore the target dir only at the root of the project. With target/, any target dir anywhere will be ignored, so, for example, you won't be able to have src/target/mod.rs.

Technically it should be /target/, but either works.

I'm going to close this as intended behavior.

Was this page helpful?
0 / 5 - 0 ratings