I've added a function to my bash profile:
function git-checkout-origin { git checkout -B $1 origin/$1; }
export -f git-checkout-origin
the function works fine, but everyonce in a while when running some command that executes commands in a shell I get this error:
sh: error importing function definition for `git-checkout-origin'
I'm not quite sure what's causing this, although it seems likely that sh & bash use different syntaxes for functions, or that the function is otherwise incompatible with sh.
I don't need the function in subshells, though the broken function isn't really breaking things either, but I'd like to get rid of the error.