Is it possible to 'fork a fork' in Github?

2019-01-18 01:04发布

I am currently working on a project that is a spinoff (fork) from a framework I have been working on.

This project is intended to be pretty generic, but now I need to fork the codebase again for a client of mine.

At this moment, I have created a custom branch for my client, but I'd rather have a standalone repository for this.

  • Is is possible to 'fork a fork'?
  • If not, what alternatives do I have?

Outline of the situation:

  • Framework repository (original)
    • Generic application repository (fork)
      • (not yet) Client repository (fork of application)

Note: when trying to 'fork a fork' in Github, you will receive a notification that you have already forked the project:

Image showing a forked project cannot be forked again

4条回答
Lonely孤独者°
2楼-- · 2019-01-18 01:45

I contacted GitHub support about this 'issue' and they confirmed this is not possible. Also, it is very unlikely that such a feature will be implemented in the future.

查看更多
Melony?
3楼-- · 2019-01-18 01:45

Of course it is possible. Unfortunately it must be done on the cmd line. After you create the base fork, create another new repo. Check out the base fork locally, add a remote to the new repo, and push to the new repo.

查看更多
狗以群分
4楼-- · 2019-01-18 01:47

This is now very possible. You just go to the fork you want to fork and click "fork" like you would always do. This only works if you don't have a different fork of that repository in your account already, though. If you do, you have to delete it.

Answered in a comment by iFreilicht

Since this is the correct answer now, it is better to highlight it.

查看更多
欢心
5楼-- · 2019-01-18 01:48

Simple answer: Yes and no.

No, for a single account as you are unable to create two repositories with the same name (and forks always have the same name).

Yes, for multiple accounts. So you could setup an organization for your second fork.

查看更多
登录 后发表回答