I am running Windows 10 64bit and Git for Windows 2.20.1. I usually use git via Visual Studio (with mostly no problem). The only time I use git from command line is when I need to push tags.
The problem is when I type git push
on Git Bash (a BASH emulation on cmd.exe), the following error message appears:
git: 'remote-Z' is not a git command. See 'git --help'.
The most similar command is
remote-fd
as if I had typed git remote-Z
. So far as I tried, any trailing options resulted in same error except for --help
, which opened a local copy of "git-push(1) Manual Page" on my browser.
How do I get git push
working again, or even troubleshoot this issue?
So far I rebooted system, re-installed Git for Windows (to the latest version), made sure that D:\Program Files\Git\cmd
is in Path
system environment value (I even put it on the top of the list), but no luck.
Googling git remote-Z
did not help either at this point of time.
These are the things I have checked:
- I had checked config files (system, global, and local). None of them containd anything related to
alias
. $ git --exec-path
returnsD:/Program Files/Git/mingw64/libexec/git-core
. The directory is full of git executables, and I made suregit-push.exe
is there.- What puzzles me the most, is that when I
cd
to local repository and run"D:\Program Files\Git\mingw64\libexec\git-core\git-push.exe"
directly, the same error messagegit: 'remote-Z' is not a git command.
appears. I made sure to re-install the whole executables but problem persists. - However, when I type
git push
outside of git repository, this message shows up:fatal: not a git repository (or any of the parent directories): .git
- as if the command is working normally. - The repositories I use are created by Visual Studio 2015.
- The path to local repository contain no multibyte characters, but the one to remote origin (which is on my company's network share) does. Does this matter?
git config --show-origin alias.push
show?git config -l
showed neitheralias.push
norremote-Z
, Ditto forgit config --show-origin alias.push
. I guess it's unrelated to config?