We have a repository in our private remote server, and we use a local server to develop.
Now, have a problem when develop, some descriptions follow as:
A git repository called "test.git" in remote server, my colleague and I clone it to develop. I modify some files and push it successfully, my colleague also modify some files, but he have not to do pull and push it.
In this case, git will not be pushed successfully, but my colleague has succeeded. I'm sure he didn't use command "git push -f origin master".
This operation cause remote repository be overwritten by his local repository history, so some modifications my push has disappeared.
Fetching remote heads...
refs/
refs/heads/
fetch cdc059293a349ec0ba9dfd54f0f3d10fe19b23d8 for refs/heads/master
refs/tags/
error: Could not read 9234f9acddff368f544f7613c2bf5b795d7b3713
updating 'refs/heads/master'
from cdc059293a349ec0ba9dfd54f0f3d10fe19b23d8
to 2cefa69d3c453c913a55d7172df406c00fdce89d
sending 2 objects
done
Updating remote server info
To https://XXXX.XXXX.com/git/test.git
cdc0592..2cefa69 master -> master
have a error
error: Could not read 9234f9acddff368f544f7613c2bf5b795d7b3713
9234f9 is my modification but git do push continue. In normal case, git will reject push. It's very strange! My git version is 2.22 but this situation the same even I have updated to 2.24 and my os use ubuntu 15.04.
Is there any way I can try it?