Reputation: 3443
I have a project on GitHub called A
and my user is user1
. Later, another user, user2
forked my project A
to his new project B
. Now he changed enough my original project (and the name of the project) and I want to fork his project B
to another project in my account. I expected that when I pushed fork button, a C
project was created in my account, but instead of it, the browser redirected me to the original project A
.
I know I can pull the changes made in project B
again to my project A
, but the changes in B
are important and I want to create another project. I can create a new branch in project A
, but I don't like this approach.
It is possible to actually create the project C
in my account (maybe with a 3rd new name)? How can I achieve this goal?
Upvotes: 3
Views: 550
Reputation: 4626
You're experiencing this for the same reason that you can't github fork
the same project twice from the same account. It has to do with how github actually defines a fork and how it treats it. When you fork ala Github, your personal repo resulting from the fork actually shares the same identifier as the parent project. Trying to fork C from B back into the same account which owns A is thus impossible.
You should use git
commands, it's very common to interact with multiple remotes. In your local repo, add both A and B as remotes (git remote add <alias_B> <url_B>
) then fetch/merge/push changes from one repo to another.
Upvotes: 4