Unfortunately, there currently is no way to access your Web IDE project from anywhere other than the Web IDE. If you want to edit the files/project locally, you’ll have to copy them over I’m afraid. That said, once you’ve done that, you’re free to use any sort of versioning system you like, be it github or dropbox for example.
You can edit .h and .cpp files in the Web IDE, but you’ll manually have to copy them into your project by using the little ‘+’ icon in the top right corner of the screen.
I’m aware that either of these is less than ideal, and it’s something I’ve been mentioning to Particle for a bit. It’s definitely on the backlog, but making the user project accessible from an API is a bit of a bigger project than you’d think on first glance (I miscalculated that one as well). With that in mind, some more pressing issues and/or more useful project have been prioritized. Let’s hope they’ll be able to work this out in the future though. For now, it’ll have to be a copy&paste though.