Keeping the dev Branch Bug-Free

The first issue can be tackled by merging the dev branch into social-login/main, testing that everything works as normal, and then merging it back into dev:

$ git checkout social-login/main$ git merge dev$ git checkout dev$ git merge social-login/main

This way, any bugs that arise due to the incompatibility of the branches will remain on the feature branch, and not on dev. This gives us a chance to fix these bugs before merging back into dev.

While this solved one issue, it exacerbated the other. Our Git history now looks like this:

Merging the main branch first is not as important for sub-feature branches, ...

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.