Git for the Antisocial: Setting Up a Local-Only Git Repository

Scenario: You want to use git but you don’t want to expose your code on a site like GitHub and you don’t want to deal with setting up your own remote repository from scratch. You want a simple, private, LOCAL repository. Is this possible with git? Is it possible to use git locally? Is it possible to use git without GitHub?

For all that git is often described as a “distributed” version control tool and sometimes confused with GitHub itself[1], you can and should sometimes be using git locally (without GitHub) if you’re using git (or GitHub) at all. Git may not be appropriate for every project, but more importantly, GitHub isn’t an appropriate venue for every project that uses git. Since setting up a local-only git repository takes all of ten seconds…

(more…)