Bash function to quickly open www.github.com in your browser to the relevant URL based on the current git repository and branch.
github-open currently supports the following commands:
github
opens GitHub repository and branchgithub compare
opens GitHub branch comparison withmaster
github compare branch_name
opens GitHub branch comparison withbranch_name
github help
displays information on how to use the scriptgithub pr
opens a GitHub pull request againstmaster
github pr branch_name
opens a GitHub pull request againstbranch_name
This requires bash-completion to be installed: https://sourabhbajaj.com/mac-setup/BashCompletion/
The easiest method to install is using Homebrew:
brew tap andrewjtait/ajt-tap
brew install github-open
You can easily uninstall using:
brew uninstall github-open
brew update
brew upgrade github-open
Clone this repository and add the following line to your .bash_profile
:
. "path/to/repo/github-open/github-open"
After installation you will either need to reload your .bash_profile
:
source ~/.bash_profile
or open a new session in your terminal.