Reputation: 55
When I push/pull origin in Github Desktop it gives error. error: The following untracked working tree files would be overwritten by merge:
frontend/node_modules/.bin/acorn.ps1
frontend/node_modules/.bin/ansi-html.ps1
frontend/node_modules/.bin/atob.ps1
frontend/node_modules/.bin/browserslist.ps1
frontend/node_modules/.bin/cross-env-shell.ps1
frontend/node_modules/.bin/cross-env.ps1
frontend/node_modules/.bin/cssesc.ps1
frontend/node_modules/.bin/cwebp.ps1
frontend/node_modules/.bin/errno.ps1
frontend/node_modules/.bin/eslint.ps1
................................
gitignore
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
node_modules/
static/
so if you know how to solve this problem please help me
Upvotes: 2
Views: 157
Reputation: 3058
It's because you didn't defined your .gitignore properly
U should give the right path for node_modules
folder.
like one of belows:
**/node_modules
frontend/node_modules
Also if you added this files before, you should ignore it from cache with command below:
git rm --cached frontend/node_modules/*
Upvotes: 1