2016-08-02 46 views
0

私はリモートの 'master'ブランチを削除しようとしています。注:ローカルのマスターブランチを削除しようとしていませんが、リモートのマスターブランチを削除しようとしています。リモートでマスターブランチを削除するには?

コマンドは

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' 

私はマスターブランチに現在ないです。

また、私はレポのための任意のデフォルトブランチを望んでいません。出来ますか?

は親切にリモートにmasterブランチを削除するためのソリューションを提案します。

+0

'gitのは、何を言う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

作業ディレクトリはクリーンです(ステージングされない変更はありません)。 git statusは何も表示しません。 – vintrojan

答えて

1

エラーメッセージは、何をすべきか正確に伝えているようです。本当に裸のリモコンの「現在」の概念があってはならないのに(「現在の」ブランチmasterを呼び出すために好きgit、私たちに未知の理由のためのように思える、デフォルトの設定では、リモート上のmasterにもかかわらず、HEADポイント(これがそうであるかもしれない状況があるかどうか分かりません))。

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. 
関連する問題