Can't add the “!” symbol in my git commit message

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 send email: Sending email with file as an attchment and not with a patch
  • What is the easiest way to convert all files in git repo to LF line endings
  • Apply a command to all commits
  • What is the difference between “git push origin HEAD:clean_up” and without HEAD?
  • Git - Cleanup squashed branches?
  • After pushing changes from one client to a remote repository, how can I get them into the workspace of another?
  • 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?

  • How to use git pickaxe option with special characters like 'ñ or á' in ANSI encoded files?
  • Rebasing and what does one mean by rebasing pushed commits
  • Git: which is the default configured remote for branch?
  • Getting rid of “git: /usr/local/lib/ no version information available (required by git)”
  • Check if all commits to one GIT branch have been cherry picked to another
  • Hiding a git submodule subdirectory until submodule init call
  • 3 Solutions collect form web for “Can't add the “!” symbol in my git commit message”

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

    $ git commit -m "First Commit\!"


    $ git commit -m 'First Commit!'

    That’s not git related at all, but bash related. Using ! in a string will cause bash to attempt history expansion. If you don’t want that, either use single-quoted strings or escape the exclamation mark with a backslash.

    No, this is possible in with the git command line and double quotes. One easy fix is putting a space after !.

    git commit -m "First Commit! "

    Another way to get around this is by using git gui or just git commit and then specifying the message in the editor that opens.

    The limitation is clearly a bash limitation and not a problem of git. You can avoid it using single quotes:

    git commit -m 'First Commit!'
    Git Baby is a git and github fan, let's start git clone.