Managing remote repositories

When collaborating on any project managed with Git, you will interact often with a constant set of other repositories; for example, in an integration-manager workflow it would be (at least) the canonical blessed repository of a project. In many cases, you will interact with more than one remote repository.

Git allows us to save the information about a remote repository (in short: remote) in the config file, giving it a nickname (a shorthand name). Such information can be managed with the git remote command.

Note

There are also two legacy mechanisms to store repository shorthand:

  • A named file in .git/remotes—the name of this file will be shorthand for remote. This file can contain information about the URL or URLs, and ...

Get Git: Mastering Version Control now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.