Cannot create simple Git alias in MinGW32 on windows 7

Cannot create simple Git alias in MinGW32 on windows 7

I am trying to create a very simple alias. I want alias the following command:

git log --oneline --graph --all -- decorate

I find this command a very useful way to view the log file. I want to alias this line as git l because its the main way I wish to view the log file. This is my attempt to create the alias:

git config --global alias .l "git log --oneline --graph --all -- decorate"

This line executes without error, but then any attempt to call git l results in the following error message.

Expansion of alias 'l' failed; 'git' is not a git command

It was explained that working environment, windows 7, minGW32, and git version 1.8.3.msysgit.0 could have something to do with this issue, but I am not sure how to resolve this. Thank you to anyone who helps out.

It should be:

git config --global alias.l "log --oneline --graph --all --decorate"

To call something other than a git command, you would prefix it with an exclamation point:

git config --global alias.foo "!foo --do-something"

In your case, it could’ve been:

git config --global alias.l "!git log --oneline --graph --all --decorate"
.
.
.
.