I created an alias for git status
with $ git config --global alias.st status
. However, when I type git st
, untracked files are not displayed. The output is a subset of what git status
prints (the list of staged and modified files is the same). What could be causing this?
Asked
Active
Viewed 73 times
0

Bulletmagnet
- 5,665
- 2
- 26
- 56
-
1What is the output of `git --local --list`? – mkrieger1 Nov 24 '19 at 23:22
-
Possible duplicate of https://stackoverflow.com/q/35616236 – mkrieger1 Nov 24 '19 at 23:44
-
Works for me as designed — the alias prints exactly the same as `git status`. Please show the output of `git config alias.st`, `git st`, and `git status`. – phd Nov 25 '19 at 03:26
-
@mkrieger1: `$ git --local --list` `Unknown option: --local` `usage: git [--version] [--help] [-C
] [-c name=value] [--exec-path[= – Bulletmagnet Nov 26 '19 at 23:06]] [--html-path] [--man-path] [--info-path] [-p | --paginate | --no-pager] [--no-replace-objects] [--bare] [--git-dir= ] [--work-tree= ] [--namespace= ] [ ]` -
Sorry, I meant `git config —local —list`. But you've hopefully figured that out already. – mkrieger1 Nov 26 '19 at 23:58
1 Answers
3
A git config --show-origin --get-regexp "alias.*"
will show you if there are any local alias which would override your global one.
An which git-st
or where git-st
will check if there is any executable git-st
which would override your alias.
Check also if you don't have any wrapper for git
itself.
The OP Bulletmagnet confirms in the comments:
Running
git config --show-origin --get-regexp "alias.*"
revealed that the repo itself had a.git/config
file containingalias.st status -uno
.
That would be a local configuration indeed, which would override any global/system one.

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
Running `git config --show-origin --get-regexp "alias.*"` revealed that the repo itself had a `.git/config` file containing `alias.st status -uno`. – Bulletmagnet Nov 26 '19 at 23:05
-
@Bulletmagnet Well spotted. I have included your comment in the answer for more visibility. – VonC Nov 27 '19 at 07:28