9

I pulled a GitHub repository and added it as a project within VisualStudio. The VS solution contains other projects which are required by the modifications I did to the repository in the first project. Currently, these are separate repositories:

my_solution (<- this should become my new repo without losing the possibility to pull changes from the original repository into locally_forked_project)
  locally_forked_project (repo)
  dependency1 (repo)
  dependency2 (repo)

Now, I'd like to create a fork of the original project on GitHub based on my VS solution. I want to be able to pull commits from the original repository and I would like to avoid using multiple repositories on GitHub.

The only way I know of are submodules but as far as I know, these would require multiple repositories on GitHub. Is there a solution to this problem?

Is this possible by any means? Are there any alternatives to using multiple repositories?

just lerning
  • 876
  • 5
  • 20
  • If I understand the question correctly, you have a third-party repo you want to keep in your repo and be able to update it? Are you making changes to the "forked" repo? Also, you say you have two dependencies (in your example), are you trying to combine **both** the dependencies and the third-party repo (or your "fork") into a single repository? – Whymarrh Dec 01 '15 at 21:43

1 Answers1

5

Is this possible without two separate repositories (master and submodule)?

Not really: your main repo must keep track of which version (gitlink) of the submodule (or even just the nested repo if you don't want to register it as a submodule) it is using (as a special entry in its index).

And the submodule must remain the forked repo it originally was in order to be able to make PR (Pull Requests).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250