Question: I'm about to use git to help me with my new project, but I don't know how to design it.

Let's say I have a master coding, and I decide to have 2 separated UI based on master coding so I create 2 brand new branches.

1. What do I do, If finally I would like to end up with 2 production versions?, most examples teach to merge each to master and delete the branch after the merge, but I want to end up with 2 production versions.
2. If I changed some coding in the master while develop those 2 branches, the 2 branches will notice the changes automatically? or I have to do anything in git?

Thanks.

Answer: 
You can just keep the branches around. It’s totally fine to have some kind of “common” branch, where you develop things that are common to both production versions, and then two production branches where each version is maintained.

Whenever you change something in the common/master branch then, the production branches are not automatically affected, as they are still based on an older version of the master branch. So if you want to enable the changes from master in those branches too (which may or may not require some additional production-specific changes anyway; so automatic is not always good), then you can just merge master into your production branches (i.e. when on your production branch, use `git merge master` to merge all changes from master into your current production branch).
```
git checkout -b core; //Shared code
git checkout -b projectFoo;
git checkout -b projectBar;

git checkout core;
// core like a boss....
git add .;
git commit -am 'shared commit';

git checkout projectFoo;
git rebase core;

git checkout projectBar;
git rebase core;

```