How can I flip desktops between two displays in OSX
If what you want to do is just to swap your screens around, then you can do this with the Displays pane in System Preferences. More specifically:


Go to Apple Menu > System Preferences
Select Displays
Click the Arrangement tab
Click and drag the display(s) to rearrange them as you wish. You can also rearrange which one has the menu bar.


If instead you wanted to do something else, please clarify your question so I (or someone else) can help you.

In the meantime, you may want to read: use multiple displays with your Mac.