I used the command:
git config --global alias.st status
to add your first alias as suggested by the post - How to execute alias commands in git?
Then I found that it is being added to the configuration file at:
C: \ Users \ damodar.bashyal \ .gitconfig
So, I added a bunch of aliases directly in the configuration file, and everything worked fine until today, when I had to restart my computer after installing the MYOB software.
When I tried to use an alias, no one worked. So, I added another alias using the above command, but the file did not update, but the new alias worked fine.
So, after a long crash, I found the command in [ Where is git config --global written to? ] to search for a configuration file:
git config --global --edit
To my surprise, it showed a different location with the git alias added to it.
.gitconfig(~) - VIM [gui] recentrepo = C:/_projects/example.com/trunk/bitbucket [user] name = damu [alias] st = status
Is there a way to change the return path to the previous .gitconfig file?
I use windows 7 and msysgit.
c:\>echo %HOME% %HOME% c:\>set HOME HOMEDRIVE=U: HOMEPATH=\ HOMESHARE=\\agsbs\UserShares\Damodar.Bashyal c:\>echo %HOME% %HOME%
UPDATE: after that [ Change user location (home variable) in Egit (Eclipse) ] to set the missing HOME environment variable, and now I get the following:
c:\>set HOME HOME=C:\Users\damodar.bashyal HOMEDRIVE=U: HOMEPATH=\ HOMESHARE=\\agsbs\UserShares\Damodar.Bashyal
This also fixed my problem. YAY !!!