(cli)=
::::{grid} 1 1 2 2 :gutter: 2 2 3 3
:::{grid-item-card} g :link: #command :link-type: url Proxy to your repo's VCS command. :::
:::{grid-item-card} Supported VCS :link: #supported-vcs :link-type: url git, svn, and hg detection. :::
::::
g is a minimal CLI wrapper that proxies to your current directory's VCS command.
When you run g, it:
- Walks up from your current directory looking for
.git,.svn, or.hg - Invokes the corresponding VCS (
git,svn, orhg) with your arguments - Exits after the command completes
Note: --version/-V is handled by g itself rather than passed to the VCS.
$ g statusIs equivalent to:
$ git status # if in a git repo
$ svn status # if in an svn repo
$ hg status # if in an hg repo(cli-main)=
.. argparse::
:module: g
:func: create_parser
:prog: g
$ g status
$ g commit -m "Fix bug"
$ g log --oneline -10
$ g diff HEAD~1| Directory marker | VCS command |
|---|---|
.git |
git |
.svn |
svn |
.hg |
hg |