Skip to main content

Open repositories, directories, and files in the browser

Project description

PyPI Python Versions

Codeship Status for albertyw/git-browse Dependency Status Code Climate Test Coverage

Open repositories, directories, and files in the browser

This is a script that can be added as a gitconfig alias to easily browse repositories on Git hosting services (e.g. github). It is built to model [arcanist’s] (https://github.com/phacility/arcanist) browse command. It is specifically designed to have no dependencies so it should be easily installable and very portable.

If you’re looking to browse different github repositories, you might like hub browse.

Installation

First clone this repository to somewhere on your system (perhaps in your dotfiles repository), then run <REPOSITORY_LOCATION>/install.sh.

Usage

Usage: git browse [-h] [--path PATH] [--dry-run] [target]

If [target] is omitted, the root repository page will be opened. If [target] is a directory or file, then that object will be opened. If [target] is a commit hash, then that commit hash will be opened. If --path is available, then its value is be used to compute the relative path to the current git repository If --dry-run is set, then git-browse will only print out the target url instead of opening it in a browser

Examples

Command

Opens

git browse

https://github.com/albertyw/git-browse

git browse README.rst

https://github.com/albertyw/git-browse/blob/master/README.rst

git browse git_browse

https://github.com/albertyw/git-browse/tree/master/git_browse/

git browse v1.1.1

https://github.com/albertyw/git-browse/commit/80b219dee0aaa86b378993cbf88511126b813c5f

Development

pip install -r requirements-test.txt
coverage run setup.py test
coverage report
flake8

Publishing

pip install twine
python setup.py sdist bdist_wheel
twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git-browse-2.4.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

git_browse-2.4.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file git-browse-2.4.0.tar.gz.

File metadata

  • Download URL: git-browse-2.4.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for git-browse-2.4.0.tar.gz
Algorithm Hash digest
SHA256 2837ada228468d903fc2d474edd7583302cafc87d8883d9a6c7b74b7529f65b8
MD5 e39bb3fe83cb1277722fc857fb9dbd5a
BLAKE2b-256 4794bd87bb4e9ac4337e7a987f2b8e6c51da56309fdec13244f5e2a2cfc81587

See more details on using hashes here.

File details

Details for the file git_browse-2.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for git_browse-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6eb667449e7b5bb24e86717be0ed9e5d1c86f6131a193ebaca4b95eb8fed86c
MD5 80f1ed29f6cbf33c3f4973145a7c50a1
BLAKE2b-256 18a84e8797c28894b17464517a223b84390eb6ebeab0861a46b39a4f06089052

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page