From dfe92527eef4e9135c0327322ddd76494db728e5 Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Thu, 12 Jan 2023 18:17:55 +0100 Subject: [PATCH] feat: add an alias to filter recent Git branches --- fish/config.fish | 2 ++ zsh/zshrc | 1 + 2 files changed, 3 insertions(+) diff --git a/fish/config.fish b/fish/config.fish index f75f56b..257325a 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -126,6 +126,8 @@ alias gwl 'git worktree list' alias gwp 'git whatchanged -p' alias gwr 'git worktree remove' # alias lg 'lazygit' +alias gcrb 'git branch --sort=-committerdate | fzf --header "Checkout Recent Branch" --preview "git diff --color=always {1}" --pointer="" | xargs git checkout ' + # Vim/Neovim alias v "vim" diff --git a/zsh/zshrc b/zsh/zshrc index 5c37183..2f9470f 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -417,6 +417,7 @@ alias gw='git worktree' alias gwl='git worktree list' alias gwa='git worktree add' # alias gwr='git worktree remove' # +alias gcrb='git branch --sort=-committerdate | fzf --header "Checkout Recent Branch" --preview "git diff --color=always {1}" --pointer="" | xargs git checkout ' # Vim alias v='vim'