0

以下命令:

$ git branch -a

产量

* develop
  master
  remotes/origin/HEAD -> origin/develop
  remotes/origin/develop
  remotes/origin/feature/foo
  remotes/origin/master

但我不想要remotes/origin/feature/foo分支。我能做些什么来得到这个?我该如何删除它?

我试过这个:

git push origin --delete origin/feature/foo

但我明白了:

error: unable to push to unqualified destination: origin/feature/foo
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 '...my remote repo...'

有任何想法吗?非常感谢 :)。

4

1 回答 1

3

你打电话时

git push origin feature/foo

git真的看到

git push origin feature/foo:feature/foo

什么意思是“将feature/foo(左侧)推到遥控器feature/foo(右侧)。

git push origin :feature/foo

你把“无”推到feature/foo

于 2012-05-08T10:37:32.163 回答