0

I'm wondering how to properly manage the seguent situation: I have a GIT repo and the tree structure is something like this

enter image description here

Branch Master contains the core of all projects (project1, project2, ..., projectn). It is a sort of CMS. Branch Develop is a safety copy of branch Master. Each project uses the core contained in the Master branch and adds some other features specialized for that project.

Sometimes happens this: I'm in a project branch (for example Project1), but I modify core features for convenience (features belong to the Core branch). How can I commit those changes in the core branches (Develop and Master) without changing branch and without (consequently) commit all changes done in the Project1 branch? What's the best solution to manage this situation? Thanks in advance.

superpuccio
  • 11,674
  • 8
  • 65
  • 93

1 Answers1

1

you can just go to your maste branch, add and commit the files that you want. then return to project branch and merge it with master. but i think that the structure you have isn't the best idea. i recommend you to use git submodule for your core project and you will be easyaly able to do what you whant. all your projects will easyaly get latest core changes and you do not need to use merges which makes your history much cleaner

Vlad Nikitin
  • 1,929
  • 15
  • 17