Code is lost after new code is pushed

Hello Support Team,

We are facing issues with git pull-push. We have a project on git with branches as per git standards.
Issue scenario:
When user1 pushes the code on his user1 branch and sends a request to merge the code, the code is reflected in the main branch. After this when a user2 wants to update his code he pulls the code from the main branch. Then user2 commits his code and pushes his code on the branch of user2. Now the code of the user2 is visible on the main branch but the code of the user1 is not reflecting. When we tried to check the issue it was when the code was being pushed from the main branch to user2 branch. Over there it shows 0 additions and 0 deletions. This is when the code is lost.