I have a really weird issue that I can't seem to resolve, although I've search for 4 hours now.
Basically, I have a Git repository on a server. I managed to clone that repository locally through SSH.
If I make local changes, I can push them to the server. But the server will revert my changes.
Step 1: making local changes
I add a test.php file locally. It shows up if I do git log.

Step 2: pushing my changes
I push my changes to the remote repository. There is no error.

Step 3: check the server repository
If I ssh onto the server, and do git status, it should show no local changes. However, it shows changes to be committed. These changes actually undo exactly what I just pushed.
In this case, it will delete the file I just added.
Step 4: check log on server
If I run git log, I have the exact same log as my local repository.

I really don't understand what's happening. I can push changes but they're undone as soon as they reach the server.
Any help would be greatly appreciated because this is driving me crazy, as I can't find anyone who has encountered the same issue as me.