git - How to get the name and person/org of the current repo for use in .gitconfig? -


basically i'm trying have handy tool can say:

git open

this open current github repository in browser. if can name use alias https://github.com/{user or org}/{repo name}.

try bash function

for linux:

function git-open-url(){   xdg-open `git config --get remote.origin.url` } 

for mac:

function git-open-url(){   open `git config --get remote.origin.url` } 

Comments