how to rename a repository on github? [duplicate]

I have changed the name of repositories before, and I’m doing it again right now 😉

Edit the name using the built-in feature under the “Settings” tab at the top of your GitHub repository page. Then go to your local repository and rename the remote. Like this:

  1. First remove it:

    git remote rm origin
    
  2. then add back the new name

    git remote add origin git@github.com:"yourname"https://stackoverflow.com/"projectname".git
    

If you have recent enough git version you should use set-url command:

    git remote set-url origin git@github.com:"yourname"https://stackoverflow.com/"projectname".git

Now it should be good to go.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)