https://github.com/github-modules/ghwd
Open the github URL that matches your shell's current branch and working directory
https://github.com/github-modules/ghwd
Last synced: 13 days ago
JSON representation
Open the github URL that matches your shell's current branch and working directory
- Host: GitHub
- URL: https://github.com/github-modules/ghwd
- Owner: github-modules
- Created: 2014-02-07T07:09:51.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2021-10-15T05:40:43.000Z (over 3 years ago)
- Last Synced: 2025-03-29T22:06:23.286Z (20 days ago)
- Language: Shell
- Homepage: npm.im/ghwd
- Size: 79.1 KB
- Stars: 421
- Watchers: 8
- Forks: 28
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - github-modules/ghwd - Open the github URL that matches your shell's current branch and working directory (Shell)
README
# ghwd
A shell command to open a git URL in your browser that matches your
shell's current branch and working directory. Works for GitHub,
BitBucket, and GitLab repositories.Runs on Mac, Linux, Cygwin, and Windows.
## Install it
```sh
npm install ghwd --global
```## Use it
```sh
cd myapp
git checkout mybranch
cd some/dirghwd
# https://github.com/bozo/myapp/tree/mybranch/some/dirghwd foo.js
# https://github.com/bozo/myapp/tree/mybranch/some/dir/foo.js
```## Use it faster
A `g` alias is created automatically to save you three keystrokes:
```sh
g foo.js
```## System Requirements
Requires the `bash` or `zsh` shell to run. Supports Mac, Linux, Cygwin and Windows by
searching for one of the following openers: `xdg-open`, `open`,`cygstart`,`start`.## Providers
`ghwd` supports git repos from the following providers:
- [github.com](https://github.com) ssh, https and `git:` remotes
- [bitbucket.org](https://bitbucket.org) ssh and https remotes
- [gitlab.com](https://gitlab.com) ssh and https remotes## See Also
If you are interested in further integration between your shell and Github,
check out the [hub](https://github.com/github/hub/) project. It adds a [git
browse](https://github.com/github/hub/#git-browse) command which works much
like this one, in addition to a number of other features.## License
[ISC](http://opensource.org/licenses/ISC)
