# git-public-url

> Obtain the public URL to a commit or file of a local repo

Latest version **1.0.3** (published 2016-07-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-public-url
pnpm add git-public-url
yarn add git-public-url
bun add git-public-url
```

Provides the command `git-public-url`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2016-07-14 |
| First published | 2016-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Diego Guerra |
| Maintainers | dgoguerra |
| Keywords | git, web, public, url, cli |

## Links

- npm: https://www.npmjs.com/package/git-public-url
- Repository: https://github.com/dgoguerra/git-public-url
- Homepage: https://github.com/dgoguerra/git-public-url#readme
- Issues: https://github.com/dgoguerra/git-public-url/issues
- npm.io page: https://npm.io/package/git-public-url

## Dependencies (6)

- [open](https://npm.io/package/open.md) 0.0.5
- [async](https://npm.io/package/async.md) ^2.0.0-rc.5
- [lodash](https://npm.io/package/lodash.md) ^4.12.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [parse-repo](https://npm.io/package/parse-repo.md) ^1.0.1
- [commit-hash](https://npm.io/package/commit-hash.md) ^0.1.2

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2016-07-14
- 1.0.2 — 2016-05-19
- 1.0.1 — 2016-05-18
- 1.0.0 — 2016-05-18

## README

## git-public-url

Obtain the public URL to a commit or file of a local repo, to open or share quickly pushed code in a browser.

### Installation

```bash
npm install -g git-public-url
```

### Usage

`git-public-url` uses the git repository in the current directory.

```bash
$ cd git-public-url/
$ git config --get remote.origin.url
git@github.com:dgoguerra/git-public-url.git

# by default, generates the url to the current commit
$ git-public-url
https://github.com/dgoguerra/git-public-url/commit/bc069fee1d0d8f58eb3f54f5771f98399dd2ca19

# another commit ref can be provided
$ git-public-url v1.0.0
https://github.com/dgoguerra/git-public-url/commit/40f327b9e81b8a0fefa7772a2c9ea7cf7645fffc

# url to a file on the given commit
$ git-public-url c177a45 -- package.json
https://github.com/dgoguerra/git-public-url/blob/c177a45cad0e5692c2c5d9ea400a636b7692821c/package.json

# open the url in a browser instead of printing it
$ git-public-url --open
```

### License

MIT license - http://www.opensource.org/licenses/mit-license.php

---
_Source: https://npm.io/package/git-public-url · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
