Reputation: 422
I have a core set of files I use for almost every project which at times I copy back from the other projects with each project also has its own unique files. But that process is cumbersome.
How does one deal with multiple projects and keeping all the core files in sync between master and projects without copying all the files in the project folder around?
Can I break off a branch into a new repo but still track changes forward and back?
Upvotes: 4
Views: 8613
Reputation: 72745
One possibility is that you put your core routines in a repository called "core" or something like that and then add that as a submodule to all your other projects.
Upvotes: 4
Reputation: 56
hmm... tough one maybe use a symlink?
Could you change the structure in which those shared items are in a shared repo and that is checked out on its own. This way, you ideally have 3 repos for 2 projects as example.
1 master 2 branch 3 shared
Using an MVC always helps with this at gitgo.. ;)
Upvotes: 0
Reputation: 6354
branches in git are probably not the best solution for your problem, but submodules are! but you need a repository for each project, plus a repository for your core files/libs.
Upvotes: 1