I'm new to git; I know the basic commands, but I'm not as familiar with the optimal way to organize projects.
I have two versions of a file that do nearly the same thing. The only difference between the two files is the way that they scan a particular file, and the differences are confined to one area of code. As I add functionality to one, I could just copy and paste the same changes into the second file, but I imagine that this is what good version control is meant to simplify.
My best guess is that I should create a second branch (say, 'branch_B') and keep a copy of the file with the same name in both branch_A and branch_B (so that they can be merged easily). But then, when I merge, won't I end up with a weird combination of the two files in the master branch, rather than an updated version of the second file?