Please note my question is not "what should i do ?", because i have already read other questions on stack overflow. I know i have to give --allow-unrelated-histories parameter.
My question is "why".
Here are operations i have done with git version 2.17.0.windows.1. Please note this error do not happen with git version 2.7.4 on Linux:
I first create an empty repository on gitlab. Then, i have 2 users, on 2 different computers:
First user:
git clone <repository_url>
cd myproject
touch file1.cpp
git add file1.cpp
git commit -m "file 1 creation"
git push origin master
Second user:
git clone <repository_url>
cd myproject
touch file2.cpp
git add file2.cpp
git commit -m "file 2 creation"
git pull
At this time, i have this error message:
fatal: refusing to merge unrelated histories
I do not understand WHY i have this error message on git windows version and not on Linux...
Thanks