I am not sure what over research fields are like, but it is quite common in computational chemistry / materials science to keep small analysis codes, scripts and tricks hidden within a research group. With an increasing number of open access projects and packages, this situation is changing.
I regularly get mails from students requesting pieces of information relating to papers I have published. My new policy is to put everything useful and requested online. The best route is not clear, but for the moment, I am adding it to my research group's GitHub. The latest additions include the crystal structure of MIL-125, an inverse spinel geometry, indium oxide nanoclusters and kesterite polytypes (see here).
In terms of version control for codes, both GitHub and Bitbucket do a fine job, especially when paired with Sourcetree. On paper, Bitbucket should be the winner as they offer both public and private repositories for free, but they can't compete with the Github mascot (octocat):
Now it’s time to learn more python with Code Academy.