git cannot lock, cannot create 에러

배세훈·2022년 5월 4일
0

git

목록 보기
4/5

fatal: cannot lock ref 'refs/heads/...' cannot create 'refs/heads/...'

브랜치는 폴더가 아니라 분기이며 분기 b가 존재하는 경우 b/something같은 그 하위 분기는 생성할 수 없다는 것

  • git 공식문서

Git can simply write reference hashes into files whose name is produced by treating the reference as a path name.

  • 해결방법

rm -rf .git/ref/브랜치명으로 브랜치를 삭제해버리면된다 강제로 삭제하는 것이기 때문에 추천하지 않는다

깃에서 괜히 막아놓은 것이 아닐테니 저러한 이름을 쓰지 않고 다른 이름으로 브랜치를 만들자`

profile
성장형 인간

0개의 댓글