Chapter 28. Git Management
Understanding Git is one of the best skills you can cultivate. It doesn’t matter if you work on the full stack, specialize on the frontend or backend, or decide to learn a different programming language. You need to know how to manage the changes that happen in the repo. The team will look to you for guidance on how to handle their branches and how changes are merged across the shared branches.
You’ve done a lot of good setup for your team by defining code conventions, using Git hooks to enforce standard commits, adding rules to your branches in GitHub, and following a consistent PR review process. Now you need to go a little further and understand various commands and strategies you can use to minimize conflicts as multiple developers push changes to the remote repo.
In this chapter, I’ll cover:
-
Branching strategies
-
Managing merging with Git commands
-
Handling merge conflicts
One of the trickiest things to do is untangle branches once changes have been merged because you have to make sure to keep the correct version of changes. It always helps to have a few techniques in mind for when conflicts happen, especially around deploy time. I’ll go through some of the ways I normally manage branches and merges from different teams as well as some other methods I’ve been introduced to over the years. Hopefully, these options will help give you ideas for what you might do.
Branching Strategies
There are a number of ways to handle branches as you have ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access