how to shorten git to g by using a alias

I am running git 2.7.2.windows.1 and I have edited my .bashrc file to have this line

alias g='git'

but when I type g status I get an error

bash: g: command not found

I even tried editing my global .gitconfig to have this line

[alias]
g=git

still getting the same error. Any way to shorten my git command to just g ?

Both the files above are in my c:\users\mylogin folder.

Answer

Attribution
Source : Link , Question Author : user9623 , Answer Author : Community

Leave a Comment