2

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

Tek Nath Acharya
  • 1,676
  • 2
  • 20
  • 35
  • 3
    Does this answer your question? [The following untracked working tree files would be overwritten by merge, but I don't care](https://stackoverflow.com/questions/17404316/the-following-untracked-working-tree-files-would-be-overwritten-by-merge-but-i) – SternK Jun 10 '20 at 18:19

1 Answers1

1

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/*
Reza Torkaman Ahmadi
  • 2,958
  • 2
  • 20
  • 43