gempir

Git find checkout

Jan 9th, 2022
805
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.19 KB | None | 0 0
  1. # Search through branch names and checkout the first one that matches
  2. alias gfc='_gfc(){ git branch -a | grep -m1 "$1" | sed "s/^\*.//g" | sed "s/remotes\/origin\///" | xargs git checkout; }; _gfc'
Advertisement
Add Comment
Please, Sign In to add comment