I want to ask this so I don’t go along with the wrong basic assumption. I believe I understand version control, I used one in a previous job to do backups of network device configurations (it was cheaper than Solarwinds ). Obviously that didn’t need branches, I just needed copies of what it looked like as of ‘x’ time. But I have never used one for code.
And I get the idea of multiple people working on an application, and wanting to merge their work into the ‘mainline’, etc. Here’s the basic question:
Am I correct that git has no knowledge of ‘code’ and while it may have capabilities like ‘diff’ - detecting what lines are different - it is the responsibility of the users to make changes that will work together? Here’s an example:
Repo ‘myprogram’ contains a function ‘function1(arg1)’. I am working on the mainline, and my co-developer creates a branch to work on an added feature. That branch changes function1, let’s say it adds an argument arg2 (I’m learning Python so…). My work in the mainline uses function1 with just arg1. If the branch is merged with the mainline, the mainline breaks because, absent any other actions, my calls to function1 only have a singe argument?
I appreciate your help!