Remove tracked files in git Works with any files / folder, it's delete in remote the target. git rm -r --cached node_modules git commit -m 'Remove the now ignored directory node_modules' git push origin master