Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Type `git open` to open the GitHub/GitLab/Bitbucket homepage for a repository.
Type git open
to open the repo website (GitHub, GitLab, Bitbucket) in your browser.
git open [remote-name] [branch-name]
git open --issue
(git open
works with these hosted repo providers, git open --issue
currently only works with GitHub, Visual Studio Team Services and Team Foundation Server)
$ git open
# opens https://github.com/TRACKED_REMOTE_USER/CURRENT_REPO/tree/CURRENT_BRANCH
$ git open someremote
# opens https://github.com/PROVIDED_REMOTE_USER/CURRENT_REPO/tree/CURRENT_BRANCH
$ git open someremote somebranch
# opens https://github.com/PROVIDED_REMOTE_USER/CURRENT_REPO/tree/PROVIDED_BRANCH
$ git open --issue
# If branches use naming convention of issues/#123,
# opens https://github.com/TRACKED_REMOTE_USER/CURRENT_REPO/issues/123
The preferred way of installation is to simply add the git-open
script
somewhere into your path (e.g. add the directory to your PATH
environment
or copy git-open
into an existing included path like /usr/local/bin
).
npm install --global git-open
Save git-open anywhere, say as ~/Documents/Scripts/git-open.sh and define a function in your Powershell profile (see ~/Documents/WindowsPowerShell/profile.ps1) like this:
function git-open { cmd /c "C:\Program Files\Git\usr\bin\bash.exe" "~/Documents/Scripts/git-open.sh" }
Set-Alias -Name gop -Value git-open
cmd
terminalSave the git-open
script in any place accessible via your %PATH%
environment var.
Add antigen bundle paulirish/git-open
to your .zshrc
with your other bundle
commands.
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
.
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/paulirish/git-open.git
git-open
to your plugin list - edit ~/.zshrc
and change
plugins=(...)
to plugins=(... git-open)
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.
zplug "paulirish/git-open", as:plugin
git-open can automatically guess the corresponding repository page for remotes
(default looks for origin
) on the following hosts:
To configure GitLab support (or other unique hosting situations) you need to set some options.
option name | description |
---|---|
open.[gitdomain].domain | The (web) domain to open based on the provided git repo domain |
open.[gitdomain].protocol | The (web) protocol to open based on the provided git repo domain. (Defaults to https ) |
git config [--global] open.[gitdomain].domain [value]
git config [--global] open.[gitdomain].protocol [value]
Example
ssh://git@git.internal.biz:7000/XXX/YYY.git
http://repo.intranet/subpath/XXX/YYY
git config [--global] "open.https://git.internal.biz.domain" "repo.intranet/subpath"
git config [--global] "open.https://git.internal.biz.protocol" "http"
By default, git open
opens the remote named origin
. However, if your current branch is remotely-tracking a different remote, that tracked remote will be used.
In some instances, you may want to override this behavior. When you fork a project
and add a remote named upstream
you often want that upstream to be opened
rather than your fork. To accomplish this, you can set the open.default.remote
within your project:
git config open.default.remote upstream
This is equivalent to always typing git open upstream
.
See hub for complete GitHub opening support.
It's the official GitHub project and provides hub browse
.
Homebrew has an alternate git-open that only works with GitHub but can open user profile pages, too.
@gerep has an alternate git-open that works with a few providers. Of note, it opens the default view for BitBucket instead of the source view.
And, of course, jasonmccreary's original gh from which this plugin was forked.
jasonmccreary did the initial hard work. Since then, many contributors have submitted great PRs.
Please provide examples of the URLs you are parsing with each PR.
You can run git-open
in echo
mode, which doesn't open your browser, but just prints the URL to stdout:
env BROWSER='echo' ./git-open
You'll need to install bats, the Bash automated testing system. It's also available as brew install bats
git submodule update --init # pull in the assertion libraries
# Run the test suite once:
bats test # or `npm run unit`
# Run it on every change with `entr`
brew install entr
npm run watch
git recent
- View your most recent git branchesdiff-so-fancy
- Making the output of git diff
so fancyCopyright Jason McCreary & Paul Irish. Licensed under MIT. http://opensource.org/licenses/MIT
--issue
and -h
addedFAQs
Type `git open` to open the GitHub/GitLab/Bitbucket homepage for a repository.
We found that git-open demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.