我試圖刪除人合併分支,但我不明白爲什麼我得到這個錯誤信息:爲什麼git返回這個錯誤信息:「error:branch'。*''not found。」
prompt> (master) $ git b
4.0
4.1
4.2
4.3
4.4
* master
prompt> (master) $ git b --merged | grep -v '*' | xargs git branch -d
error: branch '4.0' not found.
error: branch '4.1' not found.
error: branch '4.2' not found.
error: branch '4.3' not found.
error: branch '4.4' not found.
prompt> (master) $
編輯
我有問題,只是因爲我有這個配置:
#~/.gitconfig
[alias]
b = branch --color
這意味着,我的真正的命令是git branch --color --merged | grep -v '*' | xargs git branch -d
爲什麼你不能一個接一個呢?你爲什麼要搜索並顯示刪除的分支? –
我嘗試了一個一個的命令,他們都很好,後來也使用你的命令。其工作正常 –
我想我只是因爲別名 – sensorario