Git for Production因合并错误而出错
我在生产中的node_模块被另一台具有不同node_模块的本地机器搞砸了。现在,只要在生产过程中Git for Production因合并错误而出错,git,bitbucket,git-pull,Git,Bitbucket,Git Pull,我在生产中的node_模块被另一台具有不同node_模块的本地机器搞砸了。现在,只要在生产过程中I git拉动原始主机,就会显示以下消息: ubuntu@ip-:~/proj$ git pull origin master Enter passphrase for key '/home/ubuntu/.ssh/id_rsa': From bitbucket.org:laics/proj * branch master -> FETCH_HEAD error:
I git拉动原始主机
,就会显示以下消息:
ubuntu@ip-:~/proj$ git pull origin master
Enter passphrase for key '/home/ubuntu/.ssh/id_rsa':
From bitbucket.org:laics/proj
* branch master -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
node_modules/gulp-autoprefixer/package.json
node_modules/gulp-complexity/package.json
node_modules/gulp-concat/package.json
node_modules/gulp-cssnano/node_modules/object-assign/package.json
node_modules/gulp-cssnano/package.json
node_modules/gulp-jsvalidate/node_modules/.bin/esparse
node_modules/gulp-jsvalidate/node_modules/.bin/esvalidate
node_modules/gulp-jsvalidate/node_modules/esprima/package.json
node_modules/gulp-jsvalidate/package.json
node_modules/gulp-less/node_modules/object-assign/package.json
node_modules/gulp-less/package.json
node_modules/gulp-ng-annotate/package.json
node_modules/gulp-notify/package.json
node_modules/gulp-rename/package.json
.........
node_modules/gulp-shell/node_modules/lodash/isEmpty.js
node_modules/gulp-shell/node_modules/lodash/isError.js
node_modules/gulp-shell/node_modules/lodash/isFunction.js
node_modules/gulp-shell/node_modules/lo
Aborting
结果是我想更新的文件没有更新 问题是您不应该签入
节点\u模块
文件夹。否则你就有这个问题了。通常,服务器上有一个脚本,在服务器上运行该命令
因此,请使用删除node_modules文件夹
git rm --cached node_modules/
然后将其从回购中删除,但仍在您的计算机上本地。然后将其放到.gitignore
中,编写一个脚本,在推送某些更改或使用部署系统部署更改时运行install命令