-
David O'Trakoun committed with GitHub 8 years ago
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
-
1 1 # git-open 2 2 3 - Type `git open` to open the GitHub page or website for a repository in your browser. 3 + Type `git open` to open the GitHub page or website for a repository in your 4 + browser. 4 5 5 6 ## Usage 7 + 6 8 git open [remote-name] [branch-name] 7 9 8 - ![git open2015-01-24 13_51_18](https://cloud.githubusercontent.com/assets/39191/5889192/244a0b72-a3d0-11e4-8ab9-55fc64228aaa.gif) 10 + ### Examples 9 11 10 - ### Examples 11 12 $ git open 12 13 > open https://github.com/REMOTE_ORIGIN_USER/CURRENT_REPO/tree/CURRENT_BRANCH 13 14 skipped 3 lines 17 18 $ git open upstream master 18 19 > open https://github.com/REMOTE_UPSTREAM_USER/CURRENT_REPO/tree/master 19 20 21 + ![git open2015-01-24 13_51_18](https://cloud.githubusercontent.com/assets/39191/5889192/244a0b72-a3d0-11e4-8ab9-55fc64228aaa.gif) 20 22 21 - ## Installation 23 + ### Installation 22 24 23 - ### Without using a framework 25 + #### Without using a framework 24 26 25 - ```sh 26 - npm install --global git-open 27 - ``` 27 + The preferred way of installation is to simply add the `git-open` script 28 + somewhere into your path (e.g. add the directory to your `PATH` environment 29 + or copy `git-open` into an existing included path like `/usr/local/bin`). 28 30 29 - ### Using a ZSH Framework 31 + You can use also `npm` to install an OLD (1 year ago) version of this package: 30 32 31 - #### [Antigen](https://github.com/zsh-users/antigen) 33 + npm install --global git-open 32 34 33 - Add `antigen bundle paulirish/git-open` to your `.zshrc` with your other bundle commands. 35 + #### Using a ZSH Framework 34 36 35 - Antigen will handle cloning the plugin for you automatically the next time you start zsh, and periodically checking for updates to the git repository. You can also add the plugin to a running zsh with `antigen bundle paulirish/git-open` for testing before adding it to your `.zshrc`. 37 + ##### [Antigen](https://github.com/zsh-users/antigen) 36 38 37 - ### [Oh-My-Zsh](http://ohmyz.sh/) 39 + Add `antigen bundle paulirish/git-open` to your `.zshrc` with your other bundle 40 + commands. 41 + 42 + Antigen will handle cloning the plugin for you automatically the next time you 43 + start zsh, and periodically checking for updates to the git repository. You can 44 + also add the plugin to a running zsh with `antigen bundle paulirish/git-open` 45 + for testing before adding it to your `.zshrc`. 46 + 47 + ##### [Oh-My-Zsh](http://ohmyz.sh/) 38 48 39 49 1. `cd ~/.oh-my-zsh/custom/plugins` 40 - 2. `git clone [email protected]:paulirish/git-open.git gitopen` 41 - 3. Add git-open to your plugin list - edit `~/.zshrc` and change `plugins=(...)` to `plugins=(... gitopen)` 50 + 1. `git clone [email protected]:paulirish/git-open.git gitopen` 51 + 1. Add git-open to your plugin list - edit `~/.zshrc` and change 52 + `plugins=(...)` to `plugins=(... gitopen)` 53 + 54 + ##### [Zgen](https://github.com/tarjoilija/zgen) 55 + Add `zgen load paulirish/git-open` to your .zshrc file in the same function 56 + you're doing your other `zgen load` calls in. ZGen will take care of cloning 57 + the repository the next time you run `zgen save`, and will also periodically 58 + check for updates to the git repository. 59 + 60 + ##### [zplug](https://github.com/zplug/zplug) 61 + 62 + `zplug "paulirish/git-open", as:command` 63 + 64 + ### Supported remote repositories 65 + 66 + git-open can automatically guess the corresponding repository page for remotes 67 + (default looks for `origin`) on the following hosts: 68 + 69 + - github.com 70 + - gist.github.com 71 + - gitlab.com 72 + - Gitlab custom hosted (see below) 73 + - bitbucket.org 74 + - Atlassian Stash 75 + 76 + #### Gitlab support 77 + 78 + To configure gitlab support globally you need to set `gitopen.gitlab.domain` 79 + 80 + git config --global gitopen.gitlab.domain [yourdomain.here] 42 81 43 - ### [Zgen](https://github.com/tarjoilija/zgen) 82 + or in your local repository: 44 83 45 - Add `zgen load paulirish/git-open` to your .zshrc file in the same function you're doing your other `zgen load` calls in. ZGen will take care of cloning the repository the next time you run `zgen save`, and will also periodically check for updates to the git repository. 84 + git config gitopen.gitlab.domain [yourdomain.here] 46 85 86 + ## Related projects / alternatives 47 87 48 - #### Supported: 49 - * Github.com 50 - * Gists on Github 51 - * Bitbucket 52 - * Atlassian Stash 53 - * Gitlab.com 54 - * Gitlab custom hosted (see below) 88 + See [hub](https://github.com/github/hub) for complete GitHub opening support. 89 + It's the official GitHub project and provides `hub browse`. 55 90 91 + Homebrew has an alternate [git-open](https://github.com/jeffreyiacono/git-open) 92 + that only works with GitHub but can open user profile pages, too. 56 93 57 - ## Gitlab support 58 - To configure gitlab support you need to set gitopen.gitlab.domain: 94 + ## Thanks 59 95 60 - ``` 61 - git config --global gitopen.gitlab.domain [yourdomain.here] 62 - # or 63 - git config gitopen.gitlab.domain [yourdomain.here] # in your local repository 64 - ``` 96 + [jasonmccreary](https://github.com/jasonmccreary/) did 97 + [all the hard work](https://github.com/jasonmccreary/gh) 65 98 99 + See the contributors tab for a growing list of people who have submitted PRs. 66 100 67 - ## Thx 68 - @jasonmccreary did [all the hard work](https://github.com/jasonmccreary/gh) 101 + ## Contributing 102 + Please provide examples of the URLs you are parsing with each PR. 69 103 70 104 ## License 71 105 72 106 Copyright Jason McCreary & Paul Irish. Licensed under MIT. 107 + http://opensource.org/licenses/MIT 73 108 74 - http://opensource.org/licenses/MIT 109 + ## Changelog 110 + 111 + - **2016-07-11** - Changelog started (readme formatting and installation 112 + instructions updated) 113 + 75 114