0

The goal is to make a method that would grep and git checkout to the branch search.

    function gf { 
        result=$(git branch -l | grep "$1");
        git checkout $result;
    }
    export -f gf

So that one could do..

gf 150_

And I would immediately be on the branch of choice.

Unfortuantely, my method does not work.

Trip
  • 26,756
  • 46
  • 158
  • 277

0 Answers0