Steps to be followed before Commit and Push:
1.Before You pull latest changes from master(Remote Repo), Push any changes you have made only then pull others changes for updates otherwise risk loosing your work or get merge issues. 2.After pushing changes you have made only then Pull the latest changes from the remote repository to your local repository. 3.Commit Your Changes. 4.Then Push your Changes to Master.(Push Changes from local to remote after Committing your Changes to your local)
This way you can overcome Merge Issues, this happens only when two users are working on the same branch.