This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Git-link is a git sub-command for getting a repo-browser link to a git object. The motivation behind git-link is that it is often faster to navigate to a git object or path on the command line than it is to click your way to it through a web interface. An example using git-link’s github sources:

$ git config --add link.url https://github.com/gvalkov/git-link
$ git config --add link.browser github

$ git link HEAD~10
https://github.com/gvalkov/git-link/commit/d0bca29bd7

$ git link v0.2.0
https://github.com/gvalkov/git-link/tree/v0.2.0

$ git link v0.2.0 -- setup.py
https://github.com/gvalkov/git-link/tree/af4ad8c89b/setup.py

Git-link can be used with : cgit, gitweb, github, github-private

Install

Install from PyPi:

$ pip install gitlink

Or simply put git-link in your $PATH and make it executable:

https://raw.githubusercontent.com/gvalkov/git-link/master/git-link

Usage

Usage: git link [options] <commit|tree|blob|path|branch|tag|diff>

Options:
  -h, --help            show this help message and exit
  -v, --version         show version and exit
  -c, --clipboard       copy link to clipboard (overwrites link.clipboard)
  -u, --url <url>       repo browser url (overwrites link.url)
  -b, --browser <type>  repo browser type (overwrites link.browser)
  -s, --short <num>     truncate hashes to length (overwrites link.short)
  -r, --raw             show raw blob if possible

Repo browsers:
  github-private cgit gitweb github

Configuration:
  git config --add link.url <repo browser base url>
  git config --add link.browser <repo browser>
  git config --add link.clipboard false|true

Examples:
  git link HEAD~10         url of 10th commit before HEAD
  git link v0.1.0^{tree}   url of tree object at tag v0.1.0
  git link master:file     url of file in branch master
  git link path/file       url of path/file in current branch
  git link devel -- path   url of path in branch devel
  git link v0.1.0          url of tag v0.1.0

Setup

Git-link needs to know the name and url of the repository browser for the repository it is being run in. This can be set through git-config or on the command line on each run:

$ git config --add link.url <repo browser url>
$ git config --add link.browser <repo browser name>
$ git config --add link.clipboard false|true  # optional
$ git config --add link.short 7  # optional
$ git link --browser <url> --name <name> --clipboard ...

Development

See repobrowsers.py and test_cgit.py if you are interested in adding a new repository browser. Release checklist:

  1. Run py.test.
  2. Bump version in gitlink/__init__.py.
  3. Update man page - make man/git-link.1.
  4. Create standalone script - make git-link.

Please make do without bringing in any external dependencies. As nice as GitPython and libgit2 are, anything that this tool needs from git can be queried using its command line interface.

Lcense

Git-link is released under the terms of the Revised BSD License.

Release History

Release History

0.5.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
gitlink-0.5.0-py2.py3-none-any.whl (15.8 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Sep 22, 2014
gitlink-0.5.0.tar.gz (12.8 kB) Copy SHA256 Checksum SHA256 Source Sep 22, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting