You can just do this:
git remote add origin ssh://user@host:1234/srv/git/example
1234 is the ssh port being used
1234
You need to edit your ~/.ssh/config file. Add something like the following:
Host example.com Port 1234
A quick google search shows a few different resources that explain it in more detail than me.
Best answer doesn't work for me. I needed ssh:// from the beggining.
ssh://
# does not workgit remote set-url origin user@example.com:10000/aaa/bbbb/ccc.git# workgit remote set-url origin ssh://user@example.com:10000/aaa/bbbb/ccc.git