How to 'exit' git branch
Using git branch can bring up a long list of branches. This is how to 'exit' the list.
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.
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.