Adrian
Adrian

Reputation: 3711

git tag fails with $'\226git': command not found

I'm using Git BASH in windows 7 and I try to create a tag:

git tag -a v2.44.13 -m "[before prod] bla bla bla"

and fails with:

$'\226git': command not found

Same command works with Git CMD. Why this happens and how to solve it?

git version 2.11.0.windows.1

Upvotes: 33

Views: 57510

Answers (6)

user21662512
user21662512

Reputation: 21

Copy Paste issue...

"\302\203": copy-to-clipboard "\302\226": paste-from-clipboard

This worked for me : Add the following line to your ~/.bashrc:

stty lnext ^q stop undef start undef

And add the following line to your ~/.inputrc:

"\C-v": paste-from-clipboard

https://www.saltycrane.com/blog/2008/05/how-to-paste-in-cygwin-bash-using-ctrl/

Upvotes: 0

DarkEmperor
DarkEmperor

Reputation: 5

Make sure to use Ctrl + Insert to copy and Shift + Insert to paste.

Upvotes: 0

Seymur Mammadli
Seymur Mammadli

Reputation: 1814

I have faced same issue and it was because of copy-paste. Typing by hand solves the issue. If you don't want type all the command by hand try to go at the starting of the command after pasting it to the console and click backspace button multiple times. This should remove hidden characters and should work also.

Upvotes: 93

Raunak Rathour
Raunak Rathour

Reputation: 11

I have got the same problem when I haven't selected vim as the default editor in git.

In my case problem gets resolved by using a space before writing any command.

Upvotes: 1

Andrew Mascillaro
Andrew Mascillaro

Reputation: 948

When you type Ctrl+Shift+V in the terminal it adds the \226 code to the command line. If you type Shift+Insert without attempting any keyboard shortcuts it should work properly.

Upvotes: 16

Dedy Kurniawan
Dedy Kurniawan

Reputation: 296

make sure you remove any character before your command

Upvotes: 1

Related Questions