1

Is it possible to fork a solution, but only use a part of it? Say I only want 1 out of X number of namespaces, which all resides in different folders. Of course assuming there are no dependency-problems with doing so.

I still want to be able to pull upstream to get the latest changes from the master, but only for the part of the solution that is applicable for me.

Please walk me through the Git-commands needed.

UPDATE: If the solution is just to delete files, then how do I avoid future merge-problems? How do I tell Git that these deletes are the latest and correct changes to my repo?

1 Answer 1

1

I think you could do a usual branch and then delete parts you don't need. You still will be able to pull changes (with slight conflicts though), however, obviously, it is quite difficult to push any changes back (only maybe by cherry-pick).

Sign up to request clarification or add additional context in comments.

2 Comments

Explain to someone with no too much experience of Git what possible side-effects this could have in the long run. I would like to say "even if I delete these files, don't see it as a merge-conflict".
Nothing criminal as I see... But some questions arise. E.g. if something new is created in master, it will be pulled to the fork too (unless manually excluded during merge), is it ok? What if somebody would edit the master code and accidentally adds a reference to the deleted part (after pull the fork will not work)? And there is million what-ifs... And I think the better decision is to divide the solution in modules which could be separately developed with explicit dependencies. So, maybe it is not a job for VCS, but for dependency management system.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.