0

I want to be able to fork the same repository twice but understand this is not possible. I would like to have one for submitting pull requests to the project (I would like to keep this one as a normal fork) and one to allow me to use the framework for my project. What makes my issue different to other issues as far as I know is that I need to keep both repositories up to date. Can anyone help?

Thanks, Louis

3
  • I tried created two forks but Github does not allow this and this is confirmed by the official documentation. Can you elaborate on the sandboxes? Jan 8, 2019 at 20:05
  • Sorry, I misunderstood your question. Yes, I could see why you'd want two forks, and I'm not sure why GitHub doesn't allow it.
    – joanis
    Jan 8, 2019 at 20:15
  • Agreed, I understand it is not a feature needed by many but as you said I don't understand why they don't add it. Jan 8, 2019 at 20:19

1 Answer 1

0

I'm 99% certain you DON'T want to fork the project to use it as a framework for your own. You might want to fork the code, that's not the same as forking the project.

First of all I suggest you read up on git submodules. If you are trying to include another project as part of your project. If the submodules feature does what you want then use it and don't fork.

If that's not what you're after and you really do want to fork the code but you don't want to fork all the other junk (such as issues) then I suggest you just fork it yourself with git and don't use github's special features:

  1. Create a new (blank) project on github
  2. Clone the project you want to fork locally
  3. Add your own repository a second remote (eg called "downstream"):

    git remote add downstream https://github.com/user/project.git

  4. Push to your own project

    git push downstream --all

Then at any time you can always setup a local repository with two remotes and pull from one, and push to the other.

Git is designed for this exact use case, even if github has deliberately made it less easy.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.