Managing your local branches

Suppose you just have your local Git repository, and, at the moment, you have no intention of sharing the code with others; you can, however, easily share the knowledge you have while working with a repository with one or more remotes. Local branches with no remotes work exactly in this fashion. As you can see in the examples, we are cloning a repository, and thus we have a remote.

Let's start by creating a few local branches.

Get Git Version Control Cookbook 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.