Reputation: 2237
Okay I couldn't think of a good title for this, so here's the story.
I made a survey app that was a very specific one, from odd invitation logic to creating PDF at specific parts of the procedure, I made it as the master branch since it was a small and one time app.
Then a few years later there was another project that could use this app with small modifications. That went well too but now I have a problem, I want to have a master branch that I could work on the core parts and bug fixes, then the other branches could pull it.
The only way I can think of is, I have to move my master(the first project) to a branch(version/aa), and then remove all the project specific stuff on the master, if I pull that to my version/aa, that would delete the specific code for that branch, so then I have to manually revert the code parts back, which seems to be full of danger.
Is there any good way to do it?
Upvotes: 1
Views: 40
Reputation: 387637
master
is just a name, you can name your branch whatever you want and also change the meaning of that name to whatever you prefer. master
is just the default name for the default branch which is often kept as the branch where the main development happens.
You can also simply rename existing branches using git branch -m oldname newname
. And you can always introduce a branch pointing to an older version using git branch branchname old-commit-hash
.
So in your case, you could just create a branch from the old point before everything got specific. Then you can even merge in some of the changes from the specific development to make it more robust. And from then on, you can start working on the core and merge its changes into the specific release branches.
Upvotes: 1