A Better Approach to Merging Files in Git

Brice McIver Development Technology, Git Leave a Comment

Git has many features, but it’s likely that you only use a small subset on a daily basis. While git tends to handle things intelligently most of the time, there are situations when doing the most obvious thing doesn’t give git enough information to make informed choices.

In this post, we’ll examine one such scenario – merging files. Through trial and error, I’ll show you the normal approach people take, some of the issues that occur with that approach, and a completely different approach that preserves some data lost in the first approach.