From f08f228895ad5a9f12f991f872c4c45f729af73a Mon Sep 17 00:00:00 2001 From: Isabelle Viktoria Maciohsek Date: Sun, 4 Apr 2021 14:05:57 +0300 Subject: [PATCH] Add view local branches --- snippets/view-all-branches.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 snippets/view-all-branches.md 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 +```