I'm using a bash shell on mac.
I want to write a shell script 'gac' such that running
> gac one two three produces exactly the same effect as running
> git add . > git commit -m "one two three" So far my script is this:
function gac() { git add . concatenated="'$*'" git commit -m "$concatenated" } I found the trick for concatenating the shell arguments into a single space-separated string (second line of script) here. The above script almost works, except that the log message reads
a382806 'one two three' when I use my shell script, instead of
a382806 one two three as when I manually type in
> git commit -m "one two three" on the command line.
Any ideas?