Update to Pimcore 6 from pimcore 4.6

Hi all:
I’m trying to figure out how to update to a new Pimcore version but mantaining all my dataobjects. I’ve imported my different class definitions to the new version, but i can’t figure out how to reimport again all my data.
Any ideas?

Have you followed the steps of that guide? https://pimcore.com/docs/5.x/Development_Documentation/Installation_and_Upgrade/Updating_Pimcore/Upgrade_from_4_to_5/index.html

The problem is that I have the dev-master version istalled, and when I try to migrate the filesystem, for example, it throws the error:
[ERROR] Current version: dev-master. Please update to version 4.6 before upgrading to version 5
What can I do?

Basically what it says … switch from dev-master to ^4.6 and then run composer update