title: Should the package-lock.json file be added to .gitignore?
body: <p>To lock the versions of dependencies that are installed over a project, the command <code>npm install</code> creates a file called <code>package-lock.json</code>. This was made since <a href="https://nodejs.org/en/blog/release/v8.0.0/" rel="noreferrer">Node.js v8.0.0</a> and <a href="https://www.npmjs.com/package/npm5" rel="noreferrer">npm v5.0.0</a>, as several of you might know.</p>
  
  <p>Despite of <a href="https://nodejs.org/en/docs/guides/nodejs-docker-webapp/" rel="noreferrer">Node.js</a> and <a href="https://docs.npmjs.com/files/package-lock.json" rel="noreferrer">npm</a> recommendations about committing this file, several concerns regarding when you should avoid to do it, are also an option. Typically we commit in our projects, nevertheless, it is a peculiar question.</p>
  
  <p>While we should commit the <code>package-lock.json</code> file by default, we have a specific case we should not. For instance, if we want to test the latest version of our project dependencies, it can be an option to add <code>package-lock.json</code> into <code>.gitignore</code>.</p>
  
  <p>So, the questions are as follows:</p>
  
  <ol>
  <li>Should the <code>package-lock.json</code> file be added to <code>.gitignore</code>?</li>
  <li>Is there any particular situation that we <strong>MUST</strong> or <strong>MUST NOT</strong> do it?</li>
  </ol>