A surprising behavior triggered the bug report in https://github.com/git-for-windows/git/issues/888: the mere existence of the config setting "remote.origin.prune" (in this instance, configured via ~/.gitconfig so that it applies to all repositories) fooled `git remote rename <source> <target>` into believing that the <target> remote is already there. This patch pair demonstrates the problem, and then fixes it (along with potential similar problems, such as setting an HTTP proxy for remotes of a given name via ~/.gitconfig). Johannes Schindelin (2): remote rename: demonstrate a bogus "remote exists" bug Be more careful when determining whether a remote was configured remote.c | 9 ++++++++- remote.h | 2 +- t/t5505-remote.sh | 9 +++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) base-commit: d7dffce1cebde29a0c4b309a79e4345450bf352a Published-As: https://github.com/dscho/git/releases/tag/rename-remote-v1 Fetch-It-Via: git fetch https://github.com/dscho/git rename-remote-v1 -- 2.11.0.windows.3