Tip: How to use a Local Git Repository

For various reasons it may be necessary to use a local Git repository, e.g. testing in an environment without access to the internet. This post briefly describes how such a test scenario can be realized.

The first step is to download and install Git on the target system. After this is done, simply create a subdirectory and enter the command git --bare init. With this init command you create a bare repository. A bare repository is a remote repository that has no working directory, because it is only for collaboration. In this example I create it in the subdirectory BlankProcess4.

image

In the context of setting up a Git connection, it is necessary to specify a pathname with the prefix file:///. This pathname must point to the corresponding subdirectory.

image

After pressing the Add and Save buttons the first step is done and the Git repository can be used.

As you can see it is very easy to use a local Git repository.

1 Like