[GIT] exists; cannot create, remote: error: cannot lock ref
소스트리를 이용해서 Push를 하는 도중이 아래와 같은 오류가 발생했다.
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=manager-st push -v —tags origin Main/develop:Main/develop
Pushing to git@192.168.0.100:solutions/calc.git
remote: error: cannot lock ref 'refs/heads/Main/develop': 'refs/heads/Main' exists; cannot create 'refs/heads/Main/develop'
To 192.168.0.100:solutions/calc.git
= [up to date] Interop_version -> Interop_version
! [remote rejected] Main/develop -> Main/develop (failed to update ref)
error: failed to push some refs to 'git@192.168.0.100:solutions/calc.git'
Main이란 폴더 밑에 develop 브랜치를 만들고 Push 할 생각 이었는데 실수로 Main 브랜치를 만들고 그 하위에 develop 브랜치를 만들어 버렸다. 그걸 Push하려고 하니 발생한 오류다.
해결책은 새로운 폴더/브랜치를 만들어서 Push하고 이전것은 지워 버리자.
'프로그램 경험 > 프로그램 정보' 카테고리의 다른 글
GIT | 로컬에서만 파일 무시하기 (1) | 2019.07.19 |
---|---|
[Redmine] Gantt 차트 PNG 내보내기 한글 깨짐 (Bitnami) (0) | 2016.01.28 |
[엑셀 매크로] 셀 병합 하기 (1) | 2015.04.13 |
[InnoSetup] 서비스 추가 삭제 등등 (0) | 2015.01.16 |
[Windows] 노트북 와이파이 공유기 만들기 (0) | 2014.07.30 |