Reputation: 32058
We have 2 branches in a repository aaa/project
:
master
is for productiondev
is for developpementEvery developper forks aaa/project
(developer-name/project
) and create branches for each feature. When a feature is ok, developer push to his branch, then do a pull request to aaa/project
on dev
branch.
Sometimes, dev
branch (from aaa/project
) is merged into master
branch (with 3 or 4 well tested feature).
My problem is:
If something is pushed to master
branch (critical bug that needs to be in prod ASAP, assuming we have CI), dev
branch is not up to date with master
branch (on aaa/project
).
How can we have dev
branch just like master
branch just after we merged dev
into master
?
We are using git and bitbucket for hosting (I would prefer a solution directly in bitbucket, because we only clone from our repositories (developer-name/project
)).
Hope it's clear enough, thanks a lot.
Upvotes: 0
Views: 1301
Reputation: 501
As trnelson is saying. It is completely normal to merge also from master branch to dev branch. You could take a look on this excellent presentation about git branching model from Lemi Orhan Ergin! In our company we have implemented our git workflow according to this presentation.
I'm attaching a screenshot of one slide which, I think, is your case.
This is the link for the whole presentation Git Branching Model
Upvotes: 2