Reputation: 1584
I have a website that recently split into two separate versions, that have fundamental functional differences. Let's call them:
example.com alternate.example.com
Each has their own git branch.
What I'm wondering is, when a new feature comes out that needs to be deployed to both versions of the site, how do I ensure that this change will not overwrite the key differences in the alternate version?
Simply put, let's say the index.php file for alternate.example.com runs a different database query than the example.com branch. Later, we realize that index.php has a security hole that needs to be patched. If I patch it on the example.com branch and merge into alternate.example.com, then alternate.example.com loses that distinguishing database query and becomes exactly like example.com.
Is that correct or am I doing something wrong?
Upvotes: 0
Views: 72
Reputation: 13763
You need a common ancestor branch.
So:
Base would contain the index.php code common to both. example.com and alternate.example.com would simply add their respective database queries.
Thus, the security hole would be fixed in base and merged/rebased onto the example.com and alternate.example.com branches.
Upvotes: 1