If you do not want to commit your local changes and overwrite with what is available in remote then you have to revert your local changes first. Please see details here
https://docs.mendix.com/refguide/changes-pane/
Another quicker way if you have a lot of changes to discard/revert could be to delete local copy of project and open the project from your apps list on Mendix team server. It will download a fresh copy of project