4

I renamed my repository on GitHub via the Web interface but my local repository can still fetch from origin. Why is that so? Does GitHub remember the old url after renaming the repository?

0

1 Answer 1

11

Yes. See https://help.github.com/articles/renaming-a-repository:

In addition to redirecting web traffic, all git clone, git fetch, or git push operations targeting the previous location will continue to function as if made on the new location.

However, GitHub still recommends that contributors do the following:

[...] to reduce confusion, we strongly recommend updating any existing local clones to point to the new repository URL. You can do this by using git remote on the command line:

git remote set-url origin new_url 

That's a pretty convenient feature: it gives contributors (to a GitHub repo) all the time in the world to update their local config, instead of letting Git yell at them that the remote (still associated with the old URL in their local config) doesn't exist.

Sign up to request clarification or add additional context in comments.

2 Comments

So it is just a GitHub thing. I didn't find that link but I found the link inside the link you posted: help.github.com/articles/changing-a-remote-s-url
@Zingam Yes, it's just something GitHub does for your convenience. It gives contributors time to update their local config, instead of getting yelled at by Git that the (old) remote doesn't exist.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.