Merge different versions of file in UNIX

Hello Experts,
I want to merge my local file (File1) with the changes in remote server (File1). For Example:

File1 contents are... (file @ remote server)
ABC
<blankLine>
GHI
<EOF>

I, as USER#1, have updated the contents of File1 in my local as...
ABC
DEFGhi
<blankLine>
JKL
<blankLine><EOF>

meanwhile, some USER#2, have already commited the new changes in remote server repository...now the File1 contents, @ remote server, are...
ABC
123DEF
GHI
<EOF>

Now, I don't want to simply replace remote File1 with my local File1 coz by doing so, I might overwrite on USER#2 changes. So now I need to merge the latest file in remote server repository with my local file changes (without changing the sequence). Can anyone please help?

The correct way to do this is to use file revision control. See Revision control.

1 Like

Thank you fpmurphy for replying to the query!

We already have file revision control in place but just want to see whether the same can be done through UNIX.