DEV Community

Discussion on: A quick question for people who use version control

Collapse
 
rodiongork profile image
Rodion Gorkovenko

Hi Friend!

If I understand situation properly, of course your position is correct. Git is clever enough so no such additional precautions are needed. Moreover it is more hindrance than help - you will lose ability to easily check differences between versions of file (you still can compare files, of course, using IDE features for this - but it is awkward anyway).

Then at some point file in the master is updated (perhaps someone have completed feature in some other branch and merged it) - you now need to merge this update to your branch - but git won't understand this, as this is different file. Well, you can work around this, but anyway it is difficult.

Moreover, imagine merge between two branches (without merging to master) - e.g. for creating deployment for tests. Files will have different names in both branches, say ValidatedFormView.java and ImprovedV3FormView.java and git will think it is a conflict that you are trying to rename file in two different ones. You'll need to resolve it manually.

I don't like it because git is complicated system and "workarounding" it may create a lot of mess, especially when changesets are large (perhaps, several files).

how can I convince him as such?

Well, if person is doing something wrong, it is not always easy to help him switch to the proper way. His way is not disastrous, so your team can continue this way, though it is wrong and somewhat painful. Whatever reasons you'll give, he can point some workarounds.

So you should try your best. Be friendly, propose asking for mediation from some other colleagues or from internet (here or stackoverflow). Suggest creating question at stackoverflow by you both, in co-authorship. It is important to remember that your colleague suggests his way not because he is evil or silly. He wants the project to be more safe. But probably with more experience he later may see that "manual version control" in this manner won't really increase safety.