Git

1.If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue.

解决方法:

rm -f ./.git/index.lock

 2.git push 提示 "更新被拒绝,因为您当前分支的最新提交落后于其对应的远程分支"

解决方法:

  A.本地已存在项目,需要先获取远端更新并与本地合并,再git push,具体操作如下:

git remote add origin https://github.com/username/Hello-World.git  
git fetch origin    //获取远程更新
git merge origin/master //把更新的内容合并到本地分支

  B.下面方式也可以解决此问题

git pull origin master
原文地址:https://www.cnblogs.com/kangping/p/6226936.html