Can't make git stop tracking package-lock.json : <p>With npm v5 here is now <code>package-lock.json</code> file being created after <code>npm install</code></p>

<p>It is recommended to commit this file, but I have issue that this file is different for some reason between my dev machine and my server. Even if I push that file to repo, after <code>npm install</code> on server, file changes.</p>

<p>So now I'm attempting to make git untrack this file. After following numerous answers from other questions, I seem to have almost managed to do so, it's not tracked on dev machine, doesn't appear in the repo itself, but after I pull code to server and make <code>npm install</code>, it appears in <code>modified</code> files.</p>

<p>File is in <code>.gitignore</code>, but server git for some reason ignores it.</p>

<pre>git check-ignore -v -n package-lock.json
::      package-lock.json</pre>

<pre>git check-ignore -v -n --no-index package-lock.json
.gitignore:10:package-lock.json package-lock.json </pre>

<p><em>Possibly relevant info:</em></p>

<p>Dev machine: Windows 10.
Server: Ubuntu 14.04.
I'm pulling code to server using tags.</p>
