Creating Local Git Repositories – Yeah, it’s that simple!

We’re in the process of evaluating several source control systems here at the office. It’s a JOYOUS experience and I mean that… sorta. Currently, we have a montage of files dumped into two SourceSafe repos.

At this point, most of you are either laughing, crying, or have closed your web browser so you don’t get caught reading something with the word ‘SourceSafe’ in it. That’s cool, I get that.

As part of my demonstrations (for the various toolings we’re looking at), I wanted to show how simple it was to create a local GIT repository.

Since I’m discussing ‘local’, I’m taking a lot of things out of the picture.

Authentication/authorization is handled by Windows file permissions/Active Directory. If you can touch the repo and read it, then knock yourself out.

Everything is handled through shares, no HTTP or that goodness. Users are used to hitting a mapped drive for SourceSafe repos, we’re just emulating that.

So what do we need to do to create a Git repository? Three easy steps (commands).

The last step is to ensure that our new ‘remote’ repository can be reproduced. Here’s a quick single line to clone our repository into another new folder, list out the contents, and verify the log has the commit we made in the first repo.

It’s amazing how quick and easy it is to setup local Git repositories. From here, we can look at the file system/Windows for authentication/authorization and focus on our migration AWAY from Visual SourceSafe. :)