Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rename a GitHub repository?

Tags:

git

github

Without modifying too much stuff, I am wondering how I can rename the repository name? Say, from foo to bar?

Any command to achieve this?

like image 392
Adam Lee Avatar asked Apr 30 '13 09:04

Adam Lee


1 Answers

  1. Click on Settings, from the github page for your repository.
  2. Give it a new name, and click on Rename.

Keep in mind that renaming doesn't preserve any links or redirects; so people going to your old repository link will get the famous 404 page of github.

In addition, you will still have to rename your local copy of the repository. Type git remote -v to see all the remotes for your local copy and then git remote set-url <name> <new-url> to update the links.

If you just want to discard you local copy and start fresh, simply re-clone it from github using the new URL.

like image 117
Burhan Khalid Avatar answered Oct 25 '22 14:10

Burhan Khalid