This is an alias I find useful to have in my dev environment.
I worked with a lot of different people in different projects and in different git repositories.
so I am often going to the repo's website to give people reference to code, so this command makes it easy to quickly get to the repo's website.
## add this to your .bashrc or .profile file
alias gito="browse_to_git_repo"
browse_to_git_repo() {
# this assumes the remote origin url is using an ssh url
# i.e. "git@domain.com:account/repo-name.git"
url=`git config --get remote.origin.url`
url=${url/\.git/\/} # remove .git from the end of the url
url=${url/\:/\/} # replace : with /
url=${url/git\@/https://} # replace git@ with https://
start "$url" # run the start command which makes it open the url in your default browser
}