My company has a piece of software we sell to multiple customers. But every customer have some different requirements (more than just \"Put our logo here\"). The core i
Thanks for @AnimiVulpis. His/Her answer gave me a hint. Here's my solution: (also base on the nvie's strategy)
1.Extract the exact common parts from project. Create a branch named shared/develop
2.Based on the shared/develop, creating a customer1's branch
git checkout -b local/customer1/develop origin/shared/develop
#push this new branch to remote
git push origin local/customer1/develop:origin/customer1/develop
git push origin local/customer1/develop:origin/customer1/master
3.Same with step 2. create other customers' branch.
4.All the common parts used for all customers should work on shared/develop branch.
4.All the feature development just for the customerN should work on its own customerN/develop branch.It should be note that all the customers' branches should merge from shared/develop branch before a new feature coding.
I think a simple and viable solution might be to have develop
and release
branches for every customer.
Edit: previously develop
was called master
in the sentence before, but I like develop better
develop
branchdevelop
and release
branchesYou would have to take extra care to make changes that affect all customers in the shared develop
and changes that only affect specific customers only on their respective branches.
You develop feature A for customer A, and feature B for customer B.
If those features do not share code they should be kept in the respective develop-*
branches, e.g. feature A will be developed in develop-customer-A
and feature B in develop-customer-B
If those features share code the shared part should be developed on the shared develop
and the parts specific to the customers in their respective branches develop-*