be the same as the Merge-‐Base • In this example, HEAD of develop is the same as master, and therefore we can fast-‐forward merge master into develop
is NOT the same as the Merge-‐Base • It is NOT possible to fast-‐forward merge master into develop • git –ff-only master while on develop, will yield fatal: Not possible to fast-forward, aborting.
into develop at some Lme • The content of K2 (blue), and K’2 (red), appear twice • Merge does not recognize K2, and K’2, are the same thing • This is NOT acceptable. II. Cherry-‐picking HoOix into develop (at the end)
is a very common scenario 1. A hoOix is released from master 2. A feature is pull-‐requested into develop • To get the hoOix from master into develop, we can only use a non-‐fast-‐forward merge I. Fast-‐Forward Merge is NOT always Possible
and M5. • These 2 commits started from M2 • M2 does not contain any feature code (i.e. K4 and M3) • And therefore K5 and M5 doesn’t have feature code either
the same area as K4… • What prevents M5 from over-‐wriLng K4 and M3? • You s&ll have to resolve conflict! • The same pre-‐cau&on is necessary in both merging, and rebasing methods.
• Team A owns the original project • Team B wants to add a feature to it • Team B makes a PR to Team A’s Home project • Team A reviews, and comment • Team B makes changes accordingly • It’s basically a feature branch from another team • No problem rebasing that • Team B doesn’t care how Team A syncs its develop with master
1. Both teams start from scratch. 2. Since it’s brand new, everything can be agreed upon beforehand. 3. If both teams are used to “merging master into develop”, good, let’s do that. 4. If both team are used to “rebasing develop onto master”, why not? 5. If they think differently, pick one. • Not that hard to get 2 team leads, and have them reach one conclusion 6. The developers on both sides have to rebase their personal and feature branches anyways, it really doesn’t maUer.
it’s beler to respect the Home team’s workflow. • The Home team has the domain knowledge on that project 2. In the 3rd situaLon, • 2 out of 3 cases, the teams automaLcally know how to work with one another • In the last case, let’s have the team leads talk