1
0
mirror of https://github.com/github/gitignore synced 2024-11-22 11:44:21 +01:00

Improve the guidance on Cargo.lock in Rust.gitignore

See the following for more information:
 - https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
 - https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries
This commit is contained in:
Joel Ellis 2020-07-16 18:35:56 +00:00 committed by GitHub
parent 218a941be9
commit 99c3da4874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,8 +3,10 @@
debug/
target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
# If this is a library or crate (that other Rust projects will depend upon), keep Cargo.lock in your .gitignore.
# If youre building a binary or system library with crate-type of staticlib or cdylib, remove Cargo.lock from your .gitignore.
# If you're curious about why that is, see "Why do binaries have Cargo.lock in version control, but not libraries?" in the FAQ.
# https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries
Cargo.lock
# These are backup files generated by rustfmt