Add view local branches
This commit is contained in:
20
snippets/view-all-branches.md
Normal file
20
snippets/view-all-branches.md
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
title: View local branches
|
||||
tags: repository,branch,beginner
|
||||
---
|
||||
|
||||
Prints a list of all local branches.
|
||||
|
||||
- Use `git branch` to display a list of all local branches.
|
||||
- Use arrow keys to navigate, press <kbd>Q</kbd> to exit.
|
||||
|
||||
```sh
|
||||
git branch
|
||||
```
|
||||
|
||||
```sh
|
||||
git branch
|
||||
# master
|
||||
# patch-1
|
||||
# patch-2
|
||||
```
|
||||
Reference in New Issue
Block a user