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?
The term fork (in programming) derives from a Unix system call that creates a copy of an existing process. So, unlike a branch, a fork is independent from the original repository. If the original repository is deleted, the fork remains. If you fork a repository, you get that repository and all of its branches.
It is a better option to fork before clone if the user is not declared as a contributor and it is a third-party repository (not of the organization). Forking is a concept while cloning is a process. Forking is just containing a separate copy of the repository and there is no command involved.
Yes. If the original repository gets deleted, then the fork keeps all its commits, including the past commits. However, you will loose the line saying Forked from <User name>/<repository name> , i.e. there will be no more link to the original, now deleted, repository on GitHub.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With