I see a lot of positive feedback to responses I don't find accurate/complete at all.
There are two things to have in mind:
If you haven't cloned your repo in your machine yet, you just need to rename the Github repository and then proceed to clone the repo so you can have a local copy. In order to rename the Github repo, you just need to:
If you already have a local copy of the project, apart from following the steps above, you need to make sure your local repository (root folder) is renamed properly and it's pointing to the right remote url :) link. In order to achieve that, do the following:
mv -R current-repo-name new-repo-name
$ git remote set-url origin https://github.com/userX/repositoryU
or
$ git remote set-url origin [email protected]:userX/repositoryU.git
The second step is not mandatory, though. Github announced a while ago that they would redirect all requests from previous repository urls to the assigned ones. That means you don't need to use $ git remote set-url ...
, but they still encourage you to do so to avoid confusion.
Hope it helped. If you have any questions or the post is not clear enough, let me know.