Move folders from 'on my mac' to gmail imap

If your local message show up in Mail you can just drag and drop them into the IMAP folders using the Mail sidebar I believe. Is that what you are asking about?enter image description here