CLI Reference

g

Proxy to your repo’s VCS command.

Command
Supported VCS

Repository detection.

Supported VCS

g is a minimal CLI wrapper that proxies to your current directory’s VCS command. It detects Git, Subversion, and Mercurial repositories.

How it works

When you run g, it:

  1. Walks up from your current directory looking for .git, .svn, or .hg

  2. Invokes the corresponding VCS (git, svn, or hg) with your arguments

  3. Exits after the command completes

Note: --version/-V is handled by g itself rather than passed to the VCS.

Usage examples

$ g status

Is equivalent to:

In a git repo:

$ git status

In an svn repo:

$ svn status

In an hg repo:

$ hg status

Command

CLI alias for your current directory’s VCS command (git, svn, hg).

Usage

usage: g [-h] [--version] ...

Positional Arguments

vcs_args ...

Arguments passed to the detected VCS (git, svn, or hg)

Default
None

Options

--version, -V

show program's version number and exit

Arguments are passed to the detected VCS (except –version/-V).

Examples

$ g status
$ g commit -m "Fix bug"
$ g log --oneline -10
$ g diff HEAD~1

Supported VCS

Directory marker

VCS command

.git

git

.svn

svn

.hg

hg