rust-lang / rust-lang/cargo

add .gitignore with target/* on cargo init

Open
#9,633 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-git C-feature-request Command-init S-triage
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

I always do cargo init and then there are hundreads of files from target/ waiting to be included in the commit. I always have to add target/* to a .gitignore file. Would be nice to have this added by default on cargo init

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the cargo init entry point and trace how a new package's files are generated. Check the existing tests for cargo init behavior before deciding where the default ignore file belongs. Done means a newly initialized package includes a .gitignore containing target/*, with test coverage for that result.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.