your code looks like it's a shell alias (i see $1 substitutions and the sh command). i would suggest adding it as an alias in your .gitconfig file. in that file the "git" command is understood.
[alias]
get = 'checkout --track origin/'
(you might need a double slash, escaping and all, not 100% on that)
so calling:
$ git get someName
will essentially call:
git checkout --track origin/someName