0
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.
it seems your Windows bash is not reading your .bashrc file. Either it is in the wrong place or contains an error. You'll find that the command
alias g=git
will work fine interactively. – RedGrittyBrick – 2016-05-20T10:25:03.397@RedGrittyBrick
alias g='git'
, the'
s are required. – DavidPostill – 2016-05-20T15:41:57.430@DavidPostill: Have you actually tried it on a Linux box (I did, using alias p=pwd; alias d=date; p; d; d '+%D' etc etc) – RedGrittyBrick – 2016-05-20T15:42:51.483
@RedGrittyBrick Fair enough. All the examples I've ever seen use
'
s. I wonder why if they are not necessary. – DavidPostill – 2016-05-20T15:46:15.727figured it out. I had to source my bashrc file
source ~/.bashrc
That kinda rebooted my settings and got the short forms working. – user9623 – 2016-05-22T05:52:02.233