Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Fork Name For Github

Tags:

github

I recently had an idea for a project. I found a project identical to the one I want to create on Github. I got very lucky because the person just started so there is a base, but everything is very raw and perfect for adding onto.

I made a fork of the project and made a big mistake. After I cloned the fork and committed changes to it I realized I wanted to rename the fork. Obviously this would have been easier to do from the start.

These are instructions from Github itself

When you rename a repository, its issues, wiki, stars, and followers are preserved. Forks continue to point to the root repository.

However, redirects are not set up for links that point to the old location. You will need to update your local repositories to point to the new location.

Which is great, i can simply rename the fork on Github but that leaves me repositories with the old links. How can I update my local repositories?

like image 709
stevenmw Avatar asked Jun 24 '13 05:06

stevenmw


People also ask

Can you rename a GitHub fork?

Previously, when you forked a repository the fork name would default to the same name as the parent repository. In some cases, that wasn't ideal because you wanted the fork to have a different name. Your only option was to rename the fork after it was created.

Can I edit a fork on GitHub com?

When you fork a project in order to propose changes to the original repository, you can configure Git to pull changes from the original, or upstream, repository into the local clone of your fork. On GitHub.com, navigate to the octocat/Spoon-Knife repository.

Can you rename your GitHub?

In the upper-right corner of any page, click your profile photo, then click Settings. In the left sidebar, click Account. In the "Change username" section, click Change username.


1 Answers

If you haven't renamed already, you can just push all pending changes, rename, and just clone again.

If you've already renamed, you should just update the origin on your local repos:

git remote set-url origin git://github.com/youruser/yourrepo 
like image 72
SheetJS Avatar answered Sep 23 '22 08:09

SheetJS