2016-08-02 2 views
0

원격에서 'master'브랜치를 삭제하려고합니다. 참고 : 로컬 마스터 브랜치가 아니라 원격 브랜치의 마스터 브랜치를 삭제하려고합니다.리모트에 master 브랜치를 지우는 방법?

명령은 I 나타나는 오류는

git push origin master --delete 

입니다 :

remote: error: By default, deleting the current branch is denied, because the next 
remote: error: 'git clone' won't result in any file checked out, causing confusion. 
remote: error: 
remote: error: You can set 'receive.denyDeleteCurrent' configuration variable to 
remote: error: 'warn' or 'ignore' in the remote repository to allow deleting the 
remote: error: current branch, with or without a warning message. 
remote: error: 
remote: error: To squelch this message, you can set it to 'refuse'. 
remote: error: refusing to delete the current branch: refs/heads/master 
To my:shared/pop.team/pop.TallyWorld 
! [remote rejected] master (deletion of the current branch prohibited) 
error: failed to push some refs to 'my:shared/pop.team/pop.TallyWorld' 

나는 현재 하지 마스터 지점입니다.

또한 repo에 대한 기본 분기를 원하지 않습니다. 가능한가?

원격으로 마스터 분기를 삭제하는 솔루션을 제안하십시오.

+0

'자식이 무슨 말을 status' 않습니다 master 삭제 또한

remote: error: You can set 'receive.denyDeleteCurrent' configuration variable to remote: error: 'warn' or 'ignore' in the remote repository to allow deleting the remote: error: current branch, with or without a warning message. 

는 복제에 아무것도 체크 아웃하지 않는 원하는 효과를 갖고있는 것 같아요? – Christoph

+0

작업 디렉토리가 깨끗하기 때문에 (변경 사항이 unstaged되지 않음); 자식 상태는 아무 것도 표시하지 않습니다. – vintrojan

답변

1

오류 메시지가 수행 할 작업을 정확하게 알려줍니다. 우리에게 알려지지 않은 이유로 보이는 것 같습니다. gitmaster을 "현재"브랜치 (실제로는 "현재"의 개념이 없어야 함)라고 말하면 좋겠지 만 HEAD은 리모컨의 기본 구성에서 master을 가리 킵니다. 이것이 다른 경우가있을 수있는 상황이 있는지 나는 모른다.)).

remote: error: By default, deleting the current branch is denied, because the next 
remote: error: 'git clone' won't result in any file checked out, causing confusion. 
관련 문제