git push之后删除node_modules
2017-05-11 16:43
375 查看
博主最近看了下自己的github,天哪,React目录简直不忍直视。。。
由于node_modules目录之前没有忽略,导致了这种情况,连索引都没法了。。
下面介绍下博主是怎么解决的吧,希望对小伙伴们有帮助。
首先在.gitignore中写入下面代码
node_modules/
jspm_packages/
在命令行进入仓库目录
删除github上.gitignore中新加的选项
git rm -r –cached .
将删除后的add
git add .
再commit
git commit -m”.gitignore is now working”
最后push一下
git push
好了,大功告成,再去看我的github,太干净了。。
顺便附上我的github地址点击进入我的github,志同道合的伙伴可以follow一下哦~
由于node_modules目录之前没有忽略,导致了这种情况,连索引都没法了。。
下面介绍下博主是怎么解决的吧,希望对小伙伴们有帮助。
首先在.gitignore中写入下面代码
node_modules/
jspm_packages/
在命令行进入仓库目录
删除github上.gitignore中新加的选项
git rm -r –cached .
将删除后的add
git add .
再commit
git commit -m”.gitignore is now working”
最后push一下
git push
好了,大功告成,再去看我的github,太干净了。。
顺便附上我的github地址点击进入我的github,志同道合的伙伴可以follow一下哦~
相关文章推荐
- git commit 之后 push 之前,想删除 个别的commit 文件
- git删除远程分之后,本地同步问题
- git删除错误的commit和push
- windows删除node_modules 文件名或扩展名太长
- windows删除node_modules[文件名或扩展名太长,目录层次超过无法删除的问题]
- 【MARK】node_modules 名字过长无法删除问题
- 使用git reset之后,如何恢复删除掉的commit
- Windows如何删除node_modules文件夹下的所有modules
- 删除node_modules文件下依赖层次过多的解决方法
- node_modules文件名或扩展名太长如何删除
- 关于GIT commit两次之后出现push代码到远程库不能成功的问题
- node_modules文件夹路径太长无法删除
- windows删除node_modules[文件名或扩展名太长,目录层次超过无法删除的问题]
- windows删除node_modules[文件名或扩展名太长,目录层次超过无法删除的问题]
- gulp使用技巧-删除node_modules文件夹,解决目录层次太深删除报错的问题
- Git提交 push、查看、删除、重命名远程分支和tag
- 【Git学习笔记】删除文件及文件夹,并push到远程库
- 删除 windows 下 node_modules 过深的目录
- 误将文件push到Git,如何删除
- 缓存Github密码,之后git push 不用再输入密码