Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
156 views
in Technique[技术] by (71.8m points)

Change Fork Name For 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?

question from:https://stackoverflow.com/questions/17268394/change-fork-name-for-github

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...