Examining more realistic examples

The example we went through previously is very simple and a bit contrived. In a more realistic working environment, the dev branch will be very active: there will be many feature/bug fix branches that stem from dev and ultimately merge back into it. To illustrate how that can cause issues, and to show you how those issues can be mitigated, we're going back to the dev branch to create another feature branch; let's call it user-schema/main:

$ git checkout -b user-schema/main devSwitched to a new branch 'user-schema/main'

Now, let's add a file, user-schema.js, which represents the entirety of our user schema feature:

$ touch user-schema.js$ git add -A && git commit -m "Add User Schema"[user-schema/main 8a31446] ...

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.