Open
Description
Problem
Every Rust project using git requires a .gitignore
file with the content /target
. This contributes to a cluttered project directory.
Proposed Solution
Whenever cargo creates the target
directory, it should also create a file target/.gitignore
with the content *
to ensure the directory ignores itself. That way, a top-level .gitignore
file that's checked into version control can be avoided completely in many cases.
Notes
This is part of #11548, which also proposes that cargo doesn't generate the top-level .gitignore
file anymore. As mentioned in this comment, that should only be done much later (if at all) for backwards-compatibility reasons.