Is it possible to use a special character in Git?

I was very glad that I fixed this stupid error in my rails code, and I happily typed the following in the terminal:

git add .
git commit -am "Finally fixed that difficult bug!"

Just to find out that git doesn't like "!". Does anyone know how I can get it in the transaction message?

+3
source share
2 answers

Use single quotes. I do not know why this does not work in double quotes. This is actually a problem with your shell, and not with git, in bash it is related to the history of commands.

You can also leave the parameter "m" and enter your commit message in your editor. That way you never have to worry about running away.

+12
source

Source: https://habr.com/ru/post/1780586/


All Articles