Why can't I get this Git alias to work?
I've installed git for windows. I want com
to be an alias for commit -m
, so that I can write for example
git com "dumb commit message"
and it works the same way as if I'd written
git commit -m "dumb commit message"
I added this line to the "gitconfig" file (why do these linux types have such a hatred of file extensions?):
[alias]
com = 'commit -m'
This doesn't work. I get
error: pathspec 'dumb commit message' did no开发者_StackOverflowt match any file(s) known to git.
I tried variations on the above syntax in "gitconfig" and I tried to define it from within Git Bash. I can't seem to get it right.
Do not use quotes around the value, just the plain command:
[alias]
com = commit -m
精彩评论