Get the git url of current repo in clipboard

Lot of times, I just want to copy the git url to clipboard. This is so common in my flow of work that I created an alias for it. Here it is:


alias git-url="cat .git/config|awk '/url/ {print $3}'|xclip -i -selection clipboard"

This site uses Akismet to reduce spam. Learn how your comment data is processed.