I'm using bash version 4.1.2(1)-release (x86_64-redhat-linux-gnu) on cygwin with git 1.7.1. I wanted to make an alias for a command that needed to use the input argument twice. Following these instructions, I wrote
[alias] branch-excise = !sh -c 'git branch -D $1; git push origin --delete $1' --
and I get this error:
$> git branch-excise my-branch sh: -c: line 0: unexpected EOF while looking for matching `'' sh: -c: line 1: syntax error: unexpected end of file
I've tried both a
- and a
-- at the end, but I get the same errors. How can I fix this?