Am I in memory chaos? `cargo new` doesn't generate .gitignore any more?

It used to generate .gitignore containing target/ ... didn't it?

Still does around here:

➜  cargo new proj
➜  ls -a proj
.          ..         .git       .gitignore Cargo.toml src
➜  cat proj/.gitignore 
/target

Just updated to 1.79

I assume you are creating a new package in a directory that is inside a git repo already. In that case, no .gitignore is created:

If the directory is not already in a VCS repository, then a new repository is created

4 Likes

Thanks for pointing out for me. I had an accidental .gitignore from parent folder...

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.