Trying to prepare simple shell commit script for git, like
git add .
git commit -m $@
git push origin master
to run it in ./script.sh ‘commit message’ manner
I ran into issue with commit messages containing space. I understand I need to wrap $@ in quotes on string 2, but all my tries have failed so far(I tried straight ‘, then \’, then fancy ‘\” I found while researching, still no luck). Please help!
Just replace
$@with"$@". That should do the trick.