gh-permalink

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 9 Imported by: 0

README

CI codecov

Create a permalink from the CLI

Installation

gh extension install spenserblack/gh-permalink

Usage

# Permalink a file
gh permalink my-file

# Permalink a line
gh permalink my-file 1

# Permalink a range of lines
gh permalink my-file 1-5
Advanced
Permalinking Commits

This extension creates a permalink from the current HEAD commit. If you need to create a permalink to a different commit, checkout that commit first.

git checkout v0.1.0
gh permalink my-file
# now you have a permalink to my-file at the commit tagged by v0.1.0
git checkout -  # go back to where you were previously checked out

Caveats

While this can create a permalink for any commit, that permalink will return a 404 error if the commit is not pushed. This extension doesn't handle pushing commits for you, so you'll need to do that yourself if you want to create a permalink to a file that may be ahead of the remote.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL