I want to rename my Github repository. Say old name is foo
and I want to rename to bar
I understand how to rename the repository on the github site.
Github also advises doing the following on the local machine:
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, 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
Question: Do I need to change the repository directory on my local machine manually? Or if I do a git pull
will it automatically change the name on my local machine.
I found some old answers to this question (before github made some changes) but, in reviewing the Github documentation and googling I can't find a satisfactory answer to my question. so this is NOT a duplicate question
Thanks in advance.
Going off of your comment, it seems that you are concerned about the name of the directory on your local machine. In this case, you are free to name it whatever you want - the name of the directory containing the repository has no impact on the repository itself, as long as the specified remote within .git is accurate.
For updating the remote on your local machine to match your new repository on GitHub, refer to GitHub User Documentation