基本上,我想要做的是有一个方便的工具,我可以这样说:
git open
这将在您的浏览器中打开当前的github存储库。如果我能得到名字,我就可以在https://github.com/{user or org}/{repo name}
中使用别名。
发布于 2016-08-09 09:03:06
尝试此bash函数
对于Linux:
function git-open-url(){
xdg-open `git config --get remote.origin.url`
}
对于Mac:
function git-open-url(){
open `git config --get remote.origin.url`
}
发布于 2016-08-09 10:42:51
我见过git-open工具。这很酷,但我只是想在我的.gitconfig
中添加一行代码,所以这是我最终要做的事情。
[alias]
open = "!open https://github.com/$(echo $(git remote get-url origin) | cut -f2 -d\":\")"
完美工作:)
https://stackoverflow.com/questions/38840031
复制相似问题