sensorario
sensorario

Reputation: 21658

why git returns this error message: "error: branch '.*' not found."

I am trying to delete al merged branch, but I dont understand why I got this error message:

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) $

edit

I've problems just because I've this configuration:

#~/.gitconfig
[alias]
    b = branch --color

This means that my real command is git branch --color --merged | grep -v '*' | xargs git branch -d

Upvotes: 2

Views: 2166

Answers (1)

Shivkumar kondi
Shivkumar kondi

Reputation: 6782

git b --merged | grep -v '*' | xargs git branch -d

Here you are trying of search the branches and then you are trying to show the deleted branches?

so deleted branches are not found on xargs git branch -d

Updated :

This worked fine for me.

git branch --merged | grep -v '*' | xargs git branch -d

Deleted branch b_01 (was b62ecb1).
Deleted branch b_02 (was b62ecb1).

Upvotes: 1

Related Questions