簡體   English   中英

我不小心創建了一個名為-track的git本地分支,如何刪除它?

[英]I accidentally created a git local branch called --track, how can I delete it?

我輸入了一個git命令,導致創建一個名為'--track'的本地分支。

我嘗試過以下方法:

git branch -m --track delme
(this renames the current branch to delme, not the branch called --track)

git checkout --track
> fatal: --track needs a branch name

git branch -d --track
(does nothing, reports nothing)

git branch -D --track
(also does nothing)

git branch -d "--track"
(also does nothing

我該如何刪除這個分支?

git branch -d -- --track

通常, --告訴git將所有后續命令行參數視為非選項。

編輯:請參閱評論,以了解git如何使用--

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM