I'm trying to add the following alias using shell function
scommit = "!f() { git submodule foreach -q --recursive 'git commit -a || :' ; git commit -am \" Update submodule \";}; f"
But when I run it in Git bash (on Windows)
git config --local alias.scommit "!f() { git submodule foreach -q --recursive 'git commit -a || :' ; git commit -am "" Update submodule "";}; f"
I got output
git config --local alias.scommit "fit fetch upstream() { git submodule foreach -q --recursive 'git commit -a || :' ; git commit -am "" Update submodule "";}; f"
and of course it doesn't work because
Expansion of alias 'scommit' failed; 'fit' is not a git command
Also I tried to run it in PowerShell but it shows usage: git config [] …
When I add it to .git/config manually then it works.
How can I add this alias using git bash/ command line / PowerShell ?
Why does it transforms to fit fetch upstream()
?