Git config alias doesn't work anymore

I used command:

git config --global status

to add my first alias as suggested by post – How do I alias commands in git?

  • Git color code for contributor page
  • Corrupted git tree?
  • How to prevent git commit tool from closing after a commit?
  • Git - make development and master track different repos. Sensible?
  • git workflow with main svn repository using git-svn
  • git - rebase ruins merge
  • Then, I found it being added to config file at:


    So, i added bunch of aliases directly on the config file and all worked perfectly until today when I had to restart my computer after installing MYOB software.

    When i tried to use alias none worked. So, i added another alias using above command, but the file didn’t get updated but new alias worked fine.

    So after struggling for a while found a command at [ Where does git config –global get written to? ] to look for the config file:

    git config --global --edit

    To my surprise, it was showing different location with new git alias added in it.

    .gitconfig(~) - VIM
       recentrepo = C:/_projects/
       name = damu
       st = status

    Is there a way to change back path to previous .gitconfig file?

    I am using windows 7 and msysgit.

    c:\>echo %HOME%
    c:\>set HOME
    c:\>echo %HOME%

    followed this post [ Change User location(home variable) in Egit (Eclipse) ] to set missing HOME environment variable and now i am getting this:

    c:\>set HOME

    That also fixed my issue. YAY!!!

  • “src refspec does not match” and “failed to push some refs” errors on git push
  • What is the right way to add .NET project with NuGet dependencies to a git repo?
  • Why doesn't “git branch” show anything in my new BitBucket clone?
  • Git LFS files not found on server
  • Git-based content management?
  • How to push a single file in a subdirectory to Github (not master)
  • One Solution collect form web for “Git config alias doesn't work anymore”

    Check what your HOME references:

    echo %HOME%
    # or
    set HOME

    git config --global will reference the HOME path (unless you would use the –file option).
    HOME isn’t defined by default on Windows, but it is set by the git-cmd.bat script included with msysgit.

    @if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
    @if not exist "%HOME%" @set HOME=%USERPROFILE%
    Git Baby is a git and github fan, let's start git clone.