我做了我自己的github回購的本地克隆,做了一個不同的項目,現在我想把它推到github作爲一個新的回購。我不得不在github上首先創建一個空白的回購站,然後推入它,因爲通過推入回收站似乎不可能創建一個新的回購站。現在,當我這樣做,我得到一個常見的錯誤消息:如何推github克隆到新的github回購?
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to matc
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
克隆遠程(空)回購成一個虛擬分支(建議在其他地方)沒有在這裏工作,我不能修改遙控器的設置回購。我不想強迫任何事情,我希望歷史很清楚,有一段時間,這是其他github回購。
我也嘗試叉原始github回購,並與該合併,但分叉github我自己的回購沒有做任何事情。
什麼是最好/最乾淨的方式來實現我想要的?
我剛試過了,同樣的錯誤消息。感謝您的建議。 –