Reputation: 59
I am working with a React project and I am going to deploy my app to Vercel, but when I push my code to GitLab I don't want to push package-lock.json
because it will get error with Vercel. Does anyone know the fastest way to push code to GitLab except package-lock.json
using command line?
Upvotes: -1
Views: 3928
Reputation: 96
Either delete the package-lock.json
file and push the code to gitlab beacuse whenever you do the npm i
again, this package-lock.json
will be created again. Like
Or you can checkout
the file after git add
like
package-lock.json
By the way you should try adding the package-lock.json
into .gitignore
file if you don't want to do the same steps again in your future deployments.
Upvotes: 1
Reputation: 311798
You should add package-lock.json
to your .gitignore
file. If it was previously added and committed to git, you should also remove it from there: git rm --cached package-lock.json
.
Upvotes: 2