browse-commit is an oh-my-zsh plugin that lets you open any commit in your browser from the command line.
- clone browse-commit in ~/.oh-my-zsh/custom/plugins
- enable this plugin by adding browse-commit to the plugins list in your
~/.zshrc
file - cd into/your/project
- git config --add browse-commit.url
https://github.com/[your-username-here]/[your-project-here]/commit
$> git clone git://github.com/adolfoabegg/browse-commit.git ~/.oh-my-zsh/custom/plugins/browse-commit
$> vim ~/.zshrc
// add browse-commit to the list of enabled plugins
plugins=(git osx browse-commit)
$> cd ~/code/browse-commit
$> git config --add browse-commit.url https://github.com/adolfoabegg/browse-commit/commit
$> brc 9893058ccd2c5384748a10e491181a0d9955b80d
That will open https://github.com/adolfoabegg/browse-commit/commit/9893058ccd2c5384748a10e491181a0d9955b80d
in my default browser.
If you're using Antigen, just add antigen bundle adolfoabegg/browse-commit
to your .zshrc
along with your other plugins.
If you're using zgen, add zgen load adolfoabegg/browse-commit
to your .zshrc
along with your other plugins.
- brc opens the last commit in the default browser
- brc bc7b10a opens a specific commit in the defaul browser
- cpc copies the url of the last commit to the clipboard
- cpc bc7b10a copies the url of a specific commit to the clipboard
browse-commit uses open
, so it currently only works on OS X.
Author