I want to get the idea on how to manage the Parent-Child Hierarchy in git
.
Let's say I have a master
branch where code will be updated once a week. I have made a new branch say MainDev
for development.
When the team works, they create branches on their local like NewBranch
.
I have 2 questions:
- How can I push the newly created branch only to
MainDev
so that,MainDev
and all the pull requests I create, should be merged only onMainDev
? - Is there any way that BitBucket automatically merges the
MainDev
branch to master and updatesmaster
andMainDev
once a week?