diff --git a/snippets/view-all-branches.md b/snippets/view-all-branches.md new file mode 100644 index 000000000..01cb461fc --- /dev/null +++ b/snippets/view-all-branches.md @@ -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 Q to exit. + +```sh +git branch +``` + +```sh +git branch +# master +# patch-1 +# patch-2 +```