git上传项目代码常见问题

在用git上传项目代码时,遇到的一些问题。首先,一开始在用gulp压缩源码后会有一个node_modules文件生成,当时不清楚,直接打包上传,后来出现下面类似的问题。请教别人,发现添加一个.gitignore忽略文件即可。不过在这次上传整理笔记时,又犯了这个问题,我想下次会记住了~

出现的问题:

e解决方法:添加一个忽略文件.gitignore

例如需要忽略的文件:


另外经常出现的一个问题:

 Another git process seems to be running in this repository, e.g.an editor opened by ‘git commit’. Please make sure all processes 
are terminated then try again. If it still fails, a git process 
may have crashed in this repository earlier: 

remove the file manually to continue.

大概意思是:git的进程已经在一个编辑器中被打开。请确保所有的进程都结束,然后再次尝试。如果仍然失败,可能是上个运行中的git崩溃,手动移除这个文件。

解决方法:找到.git文件,删除它下面的index.lock文件即可












猜你喜欢

转载自blog.csdn.net/qq_38401285/article/details/80513367