Hi guys, this my own version for ssh and https, in one line, also you can run it in a subdirectory:
bash
function GitHub()
{
git_url=`git config --get remote.origin.url`
url=`echo $git_url | sed -e "s/git@github.com:/https:\/\/github.com\//"`
if [[ $url != https://github* ]] ;
then echo "ERROR: Remote origin is invalid" && return false;
fi
# url=${git_url%.git}
# Use "open $url" if you use MacOS
# Use x-www-browser if you use GNU/Linux
x-www-browser $url
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi guys, this my own version for ssh and https, in one line, also you can run it in a subdirectory: