I have made a few libraries that different projects use.
When I make changes to projects, I sometimes make changes to the codebase, and I want to be able to manage this all through sourcetree.
So, for example, I have a project with global.js and project1.js. I also have another project with global.js and project2.js.
I never want to merge project2.js with project1 and vice-versa, however, any changes I make to global.js in either project, I want to be able to merge.
As this is work for separate companies, it is important that the code is never brought across to the wrong project.
This is obviously quite a simple example, however, in reality there are many files to deal with.
For these particular projects, the changes to each individual project is stored in subfolders to keep the project specific code separate to the global code.
eg: codebase/includes/global.js etc..
codebase/modules/project1 or codebase/modules/project2
What is the recommended way of managing this using sourcetree/bitbucket?