"D:\Program Files\Git\bin\git.exe" checkout -b "gyn_xxx" "34e90a68"
fatal: Unable to create 'D:/xxx/xxx/.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.
Done
Press Enter or Esc to close console...
從倉庫里clone了一個(gè)老的項(xiàng)目下來,新建分支和checkout都報(bào)這個(gè)錯(cuò),
百度,google了發(fā)現(xiàn)都是叫刪除 index.lock文件的和重啟電腦,試了下還是不行,
最終在http://stackoverflow.com/questions/7860751/git-fatal-unable-to-create-path-my-project-git-index-lock-file-exists
這里找到了一種可行的方式:
就是設(shè)置文件的權(quán)限

將項(xiàng)目的權(quán)限設(shè)為everyone可以全部操作,重新checkout后可行了。