O'Reilly logo

Mastering Git by Jakub Narębski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Transport protocols

In general, URLs in the configuration of remote contain information about the transport protocol, the address of the remote server (if any), and the path to the repository. Sometimes, the server that provides access to the remote repository supports various transport protocols; you need to select which one to use. This section is intended to help with this choice.

Local transport

If the other repository is on the same local filesystem, you can use the following syntaxes for specifying the URL:

/path/to/repo.git/
file:///path/to/repo.git/

The former implies the --local option to the Git clone, which bypasses the smart Git-aware mechanism and simply makes a copy (or a hardlink for immutable files under .git/objects, though you can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required