Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gref

git-backed references — a compact string format for pointing at a path in a remote git-hosted repository.

owner/repo@ref:path

gref is the shorthand you already type in chat and CLIs, written down as a small, portable grammar tools can share.

Examples

kzu/sandbox
kzu/sandbox@v1.2.3:src/hello.cs
github.com/kzu/sandbox@main:program.cs
gist.github.com/kzu/0ac826dc7de666546aaedd38e5965381:run.cs
gitlab.com/kzu/runcs@main:program.cs
Piece Meaning
host/ Optional forge (github.com, gitlab.com, gist.github.com, …)
owner/repo Repository (or gist id)
@ref Optional branch, tag, or commit (may include /, e.g. feature/foo)
:path Optional file or directory inside the repo

Omitted host, ref, or path are filled in by the application (many tools default host to github.com).

Spec

The formal grammar and rules live in gref.md and on the versioned site:

gref.sh — latest published spec, with prior versions available from the version menu.

Used by

gref is the remote-ref shape used by:

  • go# — run file-based C# apps locally or from a remote ref (dnx go -- owner/repo@ref:path)
  • runfile — run C# programs from GitHub, Gist, or GitLab refs (dnx runfile owner/repo@ref:path)

Those tools may accept additional host-specific conveniences beyond the core format; the spec defines the portable string.

License

MIT — see license.txt.

About

Portable, standardized git-backed remote references

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Sponsor this project

Used by

Contributors

Languages