Should I merge master into a branch, and then merge back into master?

I want to know if I can merge MASTER into TEST1, so I get the commits from master on test, and after I finish my feature on test1, merge that again to MASTER. is that possible? or it will raise conflicts?

That exactly how it is done. You may get conflict when you merge master into test1, that you have to resolve manually. After that you should be able to merge test1 into master without conflicts.

If thats possible, is possible to merge also test2 into test1, next merge test2 into master, and next merge test1 into master?

It is possible, but not advisable. Instead merge master into test2, then test2 back to master. (The same what you have done to test1.)

After this all your changes should be in master.

Will git understand that some commits are already merged into the branch that is being merged?

Yes, unlike SVN, Git is aware of such commits.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)