git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Han Jiang <jhcarl0814@gmail.com>
Date
Jul 24, 2025, 22:37 UTC
Message-ID
<CANrWfmR2992eD_5qoqHMCr3NzasuT=pgYqd6UGRSUhFeFS1v=g@mail.gmail.com>
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

Message 1 of 1 in “`git remote get-url --push`: `url.<base>.pushInsteadOf` is ignored (while `url.<base>.insteadOf` is not)”
  1. Han JiangJul 24, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.