這可能是一個愚蠢的問題,但我是全新的git,並且看到一個不再存在的遠程分支。'git branch -av'顯示不再存在的遠程分支
$ git branch -a
* master
remotes/origin/master
remotes/origin/production
我不認爲生產分支是遠程存在的,不知道它爲什麼仍然顯示在本地。我如何刪除/刪除這個分支?下面是試圖刪除它看起來像:
$ git push origin :production
error: unable to push to unqualified destination: production
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to '[email protected]:puppet.git'
我可以簽出所謂遠程分公司生產,但得到這樣的:
$ git checkout origin/production
Note: checking out 'origin/production'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at c323996... added powerdns module, no really
我不知道到底我在做什麼。任何幫助,將不勝感激。
'git fetch'後git branch -a的輸出是什麼? – alediaferia 2012-01-07 01:20:27
仍然相同。 – CarpeNoctem 2012-01-07 01:47:33
可能重複[如何強制刪除GitHub中的遠程分支?](http://stackoverflow.com/questions/8754183/how-to-forcefully-delete-remote-branch-in-github) – Cascabel 2012-01-07 02:03:31