This is an old revision of the document!
Overview
Some trickier operations involving branches.
Displaying
Non-verbosely
$ git branch b1 b2 dev_pdev emergency failed fix flags kerneldoc makefile * master mdio nb net_phy_kconfig of watchog x11_rday x11_rday_irq x11_rday_phy x11iru x11iru_irq $
Verbosely
$ git branch -v b1 d36df409a353 branch b1 b2 8ed29f15e876 Merge branch 'b1' into b2 dev_pdev c4c5cbc5de95 platform.c: standardize on drv/pdrv, dev/pdev names emergency 894025f24bd0 Merge tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb failed 99bd7aaa5563 [PATCH] "failed" -> "fail" in some dts files fix 5d1d2d55459b second part of fix flags 051935978432 Merge branch 'for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata kerneldoc 7201de85450d [PATCH] drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c: misspelled "dev" makefile db5941a490b1 makefile * master 3a5af36b6d0e Merge tag '4.19-rc3-smb3-cifs' of git://git.samba.org/sfrench/cifs-2.6 mdio 1397529bc401 phy: Refactor include/uapi/linux/mdio.h nb 0b07194bb55e Linux 4.14-rc7 net_phy_kconfig 2a93d87ebb56 aesthetic fixes to drivers/net/phy/Kconfig of b4e0cbfd71d3 Remove all remaining tests and usages of "chosen@0". watchog d2b752464917 watchdog: fix a small number of "watchog" typos in comments $
Really, really verbosely
Additionally, print the name of the upstream branch (if there is one):
$ git branch -v -v ... snip ... * master 3a5af36b6d0e [origin/master] Merge tag '4.19-rc3-smb3-cifs' of git://git.samba.org/sfrench/cifs-2.6 ... snip ...