Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't add the "!" symbol in my git commit message [duplicate]

Tags:

Possible Duplicate:
How do I enter an exclamation point into a git commit message from the command line?

I'm new to git, and I did this command:

git commit -m "First Commit!" 

This throws an error like this:

bash: !": event not found 

Why is this error happening? Is is that in Git, I shouldn't use ! symbols in commit?

Are there other symbols which I shouldn't use or should escape with any escape sequence?

like image 848
Ant's Avatar asked Dec 06 '11 17:12

Ant's


1 Answers

Nothing to do with git, more to do with bash - escape the ! or use single quotes, i.e.

$ git commit -m "First Commit\!" 

or, better:

$ git commit -m 'First Commit!' 
like image 195
Paul R Avatar answered Oct 23 '22 03:10

Paul R