Skip to content

Add Cargo.lock into .gitignore #388

Description

@yvvki

From this documentation https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html, it's stated that

If you’re building a non-end product, such as a rust library that other rust packages will depend on, put Cargo.lock in your .gitignore.

The GitHub gitignore convention uses it: https://github.com/github/gitignore/blob/main/Rust.gitignore

...
# 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
Cargo.lock
...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions