-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
A-gitArea: anything dealing with gitArea: anything dealing with gitA-layoutArea: target output directory layout, naming, and organizationArea: target output directory layout, naming, and organizationC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
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.
kornelski
Metadata
Metadata
Assignees
Labels
A-gitArea: anything dealing with gitArea: anything dealing with gitA-layoutArea: target output directory layout, naming, and organizationArea: target output directory layout, naming, and organizationC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.