{"thread":{"id":"63843","subject":"`git remote get-url --push`: `url.<base>.pushInsteadOf` is ignored (while `url.<base>.insteadOf` is not)","startedAt":"2025-07-24T22:37:59Z","lastAt":"2025-07-24T22:37:59Z","messageCount":1,"participants":["Han Jiang"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"522710","messageId":"CANrWfmR2992eD_5qoqHMCr3NzasuT=pgYqd6UGRSUhFeFS1v=g@mail.gmail.com","threadId":"63843","inReplyTo":null,"subject":"`git remote get-url --push`: `url.<base>.pushInsteadOf` is ignored (while `url.<base>.insteadOf` is not)","fromName":"Han Jiang","fromEmail":"jhcarl0814@gmail.com","sentAt":"2025-07-24T22:37:48Z","receivedAt":"2025-07-24T22:37:59Z","isPatch":false,"sender":{"key":"jhcarl0814@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5171262?v=4"},"body":"What did you do before the bug happened? (Steps to reproduce your issue)\n\nmkdir --parents -- './server1' './server2' './server3' './server4' './client';\ngit -C './client' init './repo'\ncd './client/repo'\ngit remote add server 'file://'\"$(realpath '../../server1/repo.git')\"\ngit config set --local --append 'remote.server.url'\n'file://'\"$(realpath '../../server2/repo.git')\"\ngit config set --local --append 'remote.server.pushurl'\n'file://'\"$(realpath '../../server3/repo.git')\"\ngit config set --local --append 'remote.server.pushurl'\n'file://'\"$(realpath '../../server4/repo.git')\"\ngit config set --local --append\n'url.scheme1://authority1/path1/.insteadOf' 'file://'\"$(realpath\n'../..')\"'/'\ngit config set --local --append\n'url.scheme2://authority2/path2/.pushInsteadOf' 'file://'\"$(realpath\n'../..')\"'/'\ngit config list --local --show-scope --show-origin\ngit remote --verbose\ngit remote get-url server\ngit remote get-url --all server\ngit remote get-url --push server\ngit remote get-url --push --all server\n\n\nWhat did you expect to happen? (Expected behavior)\n\n`git remote get-url --push server` outputs:\nscheme2://authority2/path2/server3/repo.git\n\n`git remote get-url --push --all server` outputs:\nscheme2://authority2/path2/server3/repo.git\nscheme2://authority2/path2/server4/repo.git\n\n\nWhat happened instead? (Actual behavior)\n\n`git remote get-url --push server` outputs:\nscheme1://authority1/path1/server3/repo.git\n\n`git remote get-url --push --all server` outputs:\nscheme1://authority1/path1/server3/repo.git\nscheme1://authority1/path1/server4/repo.git\n\n\nWhat's different between what you expected and what actually happened?\n\nAnything else you want to add:\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.50.1.windows.1\ncpu: x86_64\nbuilt from commit: 4d32d83913170b86f9753fca10e75cdb2223d1cc\nsizeof-long: 4\nsizeof-size_t: 8\nshell-path: D:/git-sdk-64/usr/bin/sh\nfeature: fsmonitor--daemon\nlibcurl: 8.14.1\nOpenSSL: OpenSSL 3.2.4 11 Feb 2025\nzlib: 1.3.1\nSHA-1: SHA1_DC\nSHA-256: SHA256_BLK\nuname: Windows 10.0 26100\ncompiler info: gnuc: 15.1\nlibc info: no libc information available\n$SHELL (typically, interactive shell): C:\\Program Files\\Git\\usr\\bin\\bash.exe\n\n\n[Enabled Hooks]\nnot run from a git repository - no hooks to show\n"}]}