Skip to content

Instantly share code, notes, and snippets.

@stefanlasiewski
Created May 22, 2020 01:29
Show Gist options
  • Save stefanlasiewski/c4723433e742be0dc675f03b93d50250 to your computer and use it in GitHub Desktop.
Save stefanlasiewski/c4723433e742be0dc675f03b93d50250 to your computer and use it in GitHub Desktop.
Print all git branches without needing to quit or needing to remember yet another flag
By default, `git branch` by default uses a pager, which requires that you quit out of the pager, which erases the results fmor your screen
stefanl@stefanl:zfs git branch --all
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/top
remotes/origin/zfs-0.6.3-stable
(END)^C
*WIPE*
stefanl@stefanl:zfs
Instead, just pipe it through `cat`:
stefanl@stefanl:zfs $ git branch --all |cat
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/top
remotes/origin/zfs-0.6.3-stable
remotes/origin/zfs-0.6.4-release
remotes/origin/zfs-0.6.5-release
remotes/origin/zfs-0.7-release
remotes/origin/zfs-0.8-release
stefanl@stefanl:zfs $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment