How to 'exit' git branch

Using git branch can bring up a long list of branches. This is how to 'exit' the list.

Published: 25-09-2019

The problem

In a project with lots of branches, typing git branch can bring up a list that doesn't fit in the terminal window. It let's you work through the list - but then there's no obvious way to get out.

Example

The solution

Type q.

Note that, although this looks similar to being in a terminal app such as Vim and exiting it, you are not actually in a terminal app.