Search code examples
gatsbynetlifynetlify-cli

netlify-cli settings ID in Netlify TOML


I noticed that netlify-cli automatically creates a settings ID.

Regarding the ID, the docs say the following:

[Settings]
# Added automatically by the Netlify CLI. It has no effect during normal 
# Git-backed deploys.
ID = "Your_Site_ID"

I still don't understand why this ID is there. What is the purpose of this ID? Also, can it be committed to a public git repository or is it private?

Thank you for the guidance in advance.


Solution

  • The ID field in netlify.toml is deprecated

    The netlify CLI will automatically set your siteID into a ./netlify/state.json file in your project

    This is done when running the netlify link command