Arduino Library Publishing

There exists an incomplete tutorial about writing libraries in the Learning section. For the current 1.5 library format you'll also need the library specification. Eventually your question applies more to Programming Questions.

As already mentioned, github is a good place for storing shared projects. You'll need git for copying files back and forth, I use TortoiseGit for that purpose.