2016-08-08 1 views

Répondre

3

essayer cette fonction bash

Pour Linux:

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

Pour Mac:

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

Je l'ai vu l'outil git-ouvert. C'est plutôt cool, mais je voulais juste une petite ligne dans mon .gitconfig alors voici ce que j'ai fini par faire.

[alias] 
    open = "!open https://github.com/$(echo $(git remote get-url origin) | cut -f2 -d\":\")" 

fonctionne parfaitement :)