threads / discuss / 63843

`git remote get-url --push`: `url.<base>.pushInsteadOf` is ignored (while `url.<base>.insteadOf` is not)

Subject: `git remote get-url --push`: `url.<base>.pushInsteadOf` is ignored (while `url.<base>.insteadOf` is not)

## tl;dr

One message between Jul 24, 2025 and Jul 24, 2025.

replies: 0people: 1as markdown or json

Han Jiang· Jul 24, 2025, 22:37 UTC · lore
What did you do before the bug happened? (Steps to reproduce your issue)

mkdir --parents -- './server1' './server2' './server3' './server4' './client'; git -C './client' init './repo' cd './client/repo' git remote add server 'file://'"$(realpath '../../server1/repo.git')" git config set --local --append 'remote.server.url' 'file://'"$(realpath '../../server2/repo.git')" git config set --local --append 'remote.server.pushurl' 'file://'"$(realpath '../../server3/repo.git')" git config set --local --append 'remote.server.pushurl' 'file://'"$(realpath '../../server4/repo.git')" git config set --local --append 'url.scheme1://authority1/path1/.insteadOf' 'file://'"$(realpath '../..')"'/' git config set --local --append 'url.scheme2://authority2/path2/.pushInsteadOf' 'file://'"$(realpath '../..')"'/' git config list --local --show-scope --show-origin git remote --verbose git remote get-url server git remote get-url --all server git remote get-url --push server git remote get-url --push --all server

What did you expect to happen? (Expected behavior)

`git remote get-url --push server` outputs: scheme2://authority2/path2/server3/repo.git

`git remote get-url --push --all server` outputs: scheme2://authority2/path2/server3/repo.git scheme2://authority2/path2/server4/repo.git

What happened instead? (Actual behavior)

`git remote get-url --push server` outputs: scheme1://authority1/path1/server3/repo.git

`git remote get-url --push --all server` outputs: scheme1://authority1/path1/server3/repo.git scheme1://authority1/path1/server4/repo.git

What's different between what you expected and what actually happened?
Anything else you want to add:

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info]
git version:
git version 2.50.1.windows.1
cpu: x86_64
built from commit: 4d32d83913170b86f9753fca10e75cdb2223d1cc
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64/usr/bin/sh
feature: fsmonitor--daemon
libcurl: 8.14.1
OpenSSL: OpenSSL 3.2.4 11 Feb 2025
zlib: 1.3.1
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
uname: Windows 10.0 26100
compiler info: gnuc: 15.1
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe

[Enabled Hooks] not run from a git repository - no hooks to show

← back to recent threads