If I understand it right you want to sync the Desktop Modeler with the Web Modeler?
I think that you did not commit your changes! If I see the message that you are getting: "Please commit changes to the repository first". It means you have to commit your changes within the Desktop Modeler first to be able to sync with the Web Modeler
Please look at the image below hit commit and try it again. It will probally solve the problem. If this does not solve the problem read this url to see if you can find the solution for your problem: https://docs.mendix.com/howto/web-modeler/syncing-webmodeler-desktop
Hope this will solve your problem :)!