I'm trying to make a bash function to automatically add everything untracked or modified in my working tree, commit it, and push.
This is what it looks like:
gcp() {
git add -- .;
git commit -m \"$1\";
git push origin $2;
}
However, when I test it out, I get:
$ gcp "test this" master
error: pathspec 'this"' did not match any file(s) known to git.
How do I get the quoting around the variables to behave correctly?