Category Archives: GIT

Reset GIT repo and start from scratch

Boss asked you to commit the wrong project to a newly created GIT? How frustrating that must be!

Here’s a good solution of how to reset and start your GIT over from the beginning: http://stackoverflow.com/questions/2006172/how-to-reset-a-remote-git-repository-to-remove-all-commits

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 ftp://foo.com/bar

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' ftp://foo.com/bar

Source: http://unix.stackexchange.com/questions/33339/cant-use-exclamation-mark-in-bash