There's a feature in Git called insteadOf that allows you to make shorthand URLs (so you can say things like git clone me:my-project rather than git clone git@github.com:hoelzro/my-project) - git-config unfortunately doesn't handle insteadOf. If you want your function to work with these remote URLs, you can use git ls-remote --get-url origin instead.
You might also want to use the local bash builtin to introduce git_url and url as local variables to prevent your function from contaminating your bash session!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There's a feature in Git called insteadOf that allows you to make shorthand URLs (so you can say things like
git clone me:my-project
rather thangit clone git@github.com:hoelzro/my-project
) -git-config
unfortunately doesn't handle insteadOf. If you want your function to work with these remote URLs, you can usegit ls-remote --get-url origin
instead.You might also want to use the
local
bash builtin to introducegit_url
andurl
as local variables to prevent your function from contaminating your bash session!