Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

git-select-recent

Quickly switch between recent local/remote git branches

Use:

Use it as you would any other bash function.

git-select-recent <- Displays local branches (.git/refs/heads)

git-select-recent-remote <- Displays remote branches (.git/refs/remotes) (do a git fetch beforehand)

Pass a number to display more/less branches (default is 10): git-select-recent 25

--

Example setup:

Create a .bash_functions folder ~/.bash_functions

Copy git-select-recent.sh into the ~/.bash_functions folder.

In bashrc/bash_profile/zshrc, look through all files in the ~/.bash_functions folder:

if [ -d ~/.bash_functions ]; then
        for file in ~/.bash_functions/*; do
                . "$file"
        done
fi

Add aliases

alias recent=git-select-recent 
alias remcent=git-select-recet-remote

In a git repo, type recent or remcent, and easily choose which branch to checkout.

About

Quickly switch between recent git branches

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages