How to use ! (exclamation mark) in git ftp command line

While using the brilliant git ftp just now, we came across a problem with an FTP password that had an exclamation mark in, so we were trying to run e.g.:

git ftp push --user username --passwd abcd!defg

which was returning:

-bash: !defg": event not found

because the exclamation mark character is reserved for running history commands

The solution is to enclose the password in single character quotes i.e.:

git ftp push --user username --passwd 'abcd!defg'


About Phil Smithson

Ultrarunner & CTO. Passions include Mobile app development, Scrum, Kanban, Wordpress and Symfony.

Leave a Reply

Your email address will not be published. Required fields are marked *