Ever found yourself working on a local github repository and having the need of opening or referencing files on github web? go coconut no more:
PS: mind this was designed for MacOsX
Oneliner:
/bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/devtin/c464b93909d8891572151a5f7a210743/raw/install.sh)"
- Download .github file.
- Place it somewhere in your user path
~/
- Include a line to load it in your
.bashrc
or.zshrc
file like:source ~/.github
gh <optional-path>
to print remote github url w/ branch of current repositoryghr
prints github url of the repo (no branch or path)ghb
prints github url of the repo including branchghc
copies full github url w/ branch, working dir and optional given pathgho
opens browser of github url w/ branch, working dir and optional given path