← All files

RUST .GITIGNORE

GitHub’s official Rust .gitignore template.

[ DOWNLOAD ][ MARKDOWN ][ SOURCE ]

GitHub’s official Rust .gitignore template. It is maintained in GitHub’s public template collection and released under CC0-1.0.

USE

  • Copy it to the repository root as .gitignore.
  • Merge it with project-specific patterns; later patterns take precedence.
  • Commit the result so every contributor uses the same rules.

NOTES

  • The template is a starting point; remove patterns you do not need.
  • Generated files should usually stay untracked.

SOURCE

https://github.com/github/gitignore/blob/main/Rust.gitignore

FULL TEXT

[ DOWNLOAD ]
# Generated by Cargo
# will have compiled files and executables
debug
target

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Generated by cargo mutants
# Contains mutation testing data
**/mutants.out*/

# rustc will dump stack traces when hitting an internal compiler error to PWD
rustc-ice-*.txt

# RustRover
#  JetBrains specific template is maintained in a separate JetBrains.gitignore that can
#  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
#  and can be added to the global gitignore or merged into this file.  For a more nuclear
#  option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

VERIFY SHA-256

Download the file, then choose it here. The checksum is compared locally in your browser.

Expected 26431918e449693f4385438e3955a1e078dbc9a4c78e68d8e6caf7a21647b1ff

CITE

RUST .GITIGNORE (v1.0, 2026-11-04). Original. https://original.wales/files/gitignore-rust/ SHA-256: 26431918e449693f4385438e3955a1e078dbc9a4c78e68d8e6caf7a21647b1ff. Source: https://github.com/github/gitignore/blob/main/Rust.gitignore.

← All files