I can never remember all the parameters to Git commands, so I just put an alias in the ~/.gitconfig
file that makes more sense to me, so I can remember it, and it results in less typing:
[alias]
url = ls-remote --get-url
After reloading the terminal, you can then just type:
> git url
Here are a few more of my frequently used ones:
[alias]
cd = checkout
ls = branch
lsr = branch --remote
lst = describe --tags
I also highly recommend git-extras which has a git info
command which provides much more detailed information on the remote and local branches.