dotnet / dotnet/sdk

`dotnet new gitignore` should only list actual .NET files

Open
#51,616 3 comments 0 reactions 1 assignee Claimed by @baronfel View on GitHub
untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

The current `.gitignore` lists many files I don't recognize, and I work on this product. That's odd. It's because it's not _our_ `.gitignore`. We should develop a much shorter one. I don't have a concrete problem to share, however, I have this nagging feeling that these giant `.gitignore` files will eventually present a supply chain challenge. In general, developers should understand the files they are responsible for. I don't understand the implications of adding or removing most of the lines in this file. That's a bad state of affairs for a file that we're distributing and encouraging users to add to source control that fundamentally changes the behavior of source control.

At the very least, it's not helping people learn about our platform.

Case-in-point:

```bash
$ dotnet new gitignore
The template "dotnet gitignore file" was created successfully.

$ wc -l .gitignore
482 .gitignore
```

This is the Rust experience. It is comical in comparison.

```bash
$ cargo new foo
Created binary (application) `foo` package
$ cd foo
$ ls -ah
. .. Cargo.toml .git .gitignore src
$ cat .gitignore
/target
```

I also like how `cargo` does this by default. Doesn't do this if run in a repo.

We should have a command that updates `.gitignore` to respect artifacts output.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.