【发布时间】:2018-10-18 05:20:24
【问题描述】:
当我运行git add . & git commit -m "some fix" & git push 时,它返回一个错误:
<user> alexis$ git add . & git commit -m "Add some fix" & git push
[1] 32595
[2] 32596
fatal: Unable to
create'/Users/<user>/Desktop/project/.git/index.lock': File exists.
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.
Everything up-to-date
[1]- Done git add .
[2]+ Exit 128 git commit -m "Add some fix"
当我把所有的cmd一个一个的执行完,就没问题了。
【问题讨论】:
-
使用双
&&而不是单一个。