I know a project can have two or more remote origins in Git.
I got a GitLab account from the company I work for, and I want to set up a github that will receive the projects that I work on.
The problem is that I don’t want to allow GitHub to copy ALL the work’s repository, I want it to sync with only one folder inside it.
Let me draw it to be clear:
(sorry I can add only one embedded media):
The orange is the current situation.
The green is what I wish for.
I want the GitHub repository to include ONLY one folder from the local repository, so when i’ll update any files in that folder, both repositories, GitHub and GitLab will be updated. But the GitHub repo won’t even know or gain access to the other folders inside of
Is it possible?
Also, can it be even more seperated?
For example, let me draw it again:
I mean I wish I could “link” files by their name and just create a new project every time in Github, so whenever i’ll update files:
stack.c, stack.h the project
Stack in GitHub will be updated, but also company’s GitLab at
Can it be done?
One of those options?