Created
November 29, 2021 09:19
-
-
Save MarcusResell/b08a0ba01f1e7c6b581dfe94adc6c017 to your computer and use it in GitHub Desktop.
List all local and up-to-date remote branches according to time and pick which one you want to checkout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requires xargs, awk, fzf, sed to be installed | |
lb-remote = !git fetch --all --prune && git branch -a --sort='-committerdate' --format='%(color:green)%(committerdate:relative)%(color:reset) %(refname:short)' | fzf --ansi --layout=reverse --border=rounded --info=hidden --height=10 | sed 's/.*ago[ ]*//g' | xargs git checkout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment