3

I know there are numerous sources of information on setting up git aliases, but none of them seem to be working for me.

I have recently moved over to a new computer, and moved my whole git repository. Because our team is on TFS, I'm using a separate git directory (not sure if that's relevant or not.) Everything seems to be working except for my aliases.

Doing a "git config --global --list | grep alias" gives:

alias.st=status
alias.br=branch
alias.co=checkout
alias.com=commit

I have even wiped them out of my ~/.gitconfig and reset them all.

But none of them work. "git st" grinds for a few seconds and returns with no output, while "git status" gives the expected status response. Similarly, "git br" returns nothing, while "git branch" returns a list of my branches. "git co newbranch" does nothing, while "git checkout newbranch" properly switches to the new branch.

Can anyone give me a clue as to what has gone wrong?

Dave Hanna
  • 2,491
  • 3
  • 32
  • 52
  • Git aliases are stored in a config file. Read [here](http://stackoverflow.com/questions/11747691/where-is-my-git-alias-stored) to see where they are located. You may be able to copy over your previous config file to your new computer. – Tim Biegeleisen Jun 30 '16 at 14:36
  • Tim, thanks for you comment, but the config file (~/.gitconfig) is located on a network share which is the same between the old computer and the new one. I've looked at the contents of that file, and it appears exactly as shown in all the articles that google or stackoverflow bring up. – Dave Hanna Jun 30 '16 at 16:43
  • There are _multiple_ Git config files Have you checked all of them? – Tim Biegeleisen Jun 30 '16 at 16:50
  • None of the other config/.gitconfig files have any other relevant information in them. I would expect the "git config --list" (or git config --global --list) command to supply all the aliases that are configured, and it's output is as stated in the body. – Dave Hanna Jun 30 '16 at 17:37

0 Answers0