Skip to content

Instantly share code, notes, and snippets.

@ranyitz
Last active July 20, 2022 11:21
Show Gist options
  • Save ranyitz/6f73dde2b730fab1155b313b14eec871 to your computer and use it in GitHub Desktop.
Save ranyitz/6f73dde2b730fab1155b313b14eec871 to your computer and use it in GitHub Desktop.
better git branch
alias gb="git for-each-ref --color=always --sort=-committerdate refs/heads/ --format=' %(color:green)%(committerdate:relative)%(color:reset)%09%(HEAD) %(color:yellow)%(refname:short)%(color:reset) %(color:magenta)%(authorname)%(color:reset) • %(contents:subject)'"
alias gbi="gb | fzf --ansi --header='checkout branch <choose branch>' --reverse | awk '{print $4}' | xargs git checkout"
@ranyitz
Copy link
Author

ranyitz commented Jul 19, 2022

Screen Shot 2022-07-19 at 11 42 48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment