I'm making a GitHub repository for my rust project but there are a lot of files, so I was just wondering:
Which files should I be putting in the repository and which ones should I absolutely make sure aren't in the repository?
I've tried searching it up but I just couldn't find anything.
Files that definitely need to be included:
Files that need to be included if you have them:
Files that should be included in most circumstances:
Files that should be included if you have them:
Files that should not be included:
By default, if you create a project with cargo new
or cargo init
, Cargo will generate a .gitignore file so you don't need to do anything special.
# .gitignore
/target
Generally, Rust will put any files that need ignoring in target/, but of course, if you have non-Rust files that need ignoring, you can add them to .gitignore.