Sudhanshu Gaur
Sudhanshu Gaur

Reputation: 7664

taking pull from dev and feature branch in master

I have a master branch and a dev branch, now I am trying to work on a feature and for that, I have taken a branch feature_name from dev branch.

Now suppose while one of my team is working on feature_name, the other team which is still on dev branch made some bug fixes/some new development in the code and added that code by taking pull from dev in master. Now my master and dev has this new change which my feature_name branch don't have.

Now after completing my feature_branch work I decided to take pull from feature_branch to dev and then from dev to master.

Can anyone please tell me how can I make sure that dev/master has updated code(feature code as well as hot fixes/code added in dev)

Upvotes: 0

Views: 48

Answers (1)

joanis
joanis

Reputation: 12221

In this situation, I would normally start with a merge from dev into feature_branch and do proper testing. This will make sure all the changes in dev (and also in master if they are in sync) are integrated and tested with my feature branch. Then you can merge your branch back into dev, which should be a fast-forward merge if no-one else pushed changes to dev before you.

If you merged feature_branch directly into dev, and dev into master, the result should be identical to what I am describing above. My suggested steps just give you a chance to test properly before pushing the merges.

Upvotes: 1

Related Questions