Pull App Code from Appflow repository

I have a new Macbook and would like to get the latest version of an existing app from the Appflow repository. Do I need to start the app in my file system first before I do ionic link | git pull ionic master? And what do I have to delete for this command to work? I get the error “fatal: refusing to merge unrelated histories”.