I have a number of commands that I run before executing a git project, so I put it in a bash script. At the end, I have a block that does the commit:
if [ -z $1 ]; then git commit -a -m "no message"; else; git commit -a -m $1; fi
waiting for the message to be sent to the script
$ ./dostuff_then_commit "my message"
When I do it, I get it
fatal: Paths with -a does not make sense.
because $1 defined, but the message is not transmitted correctly? Can someone see the problem and / or suggest a solution? Thanks, SO.
source share