Quickstart

Installation

Install g once, then run g where you already run Git, Subversion, or Mercurial. Use one of these commands for the latest official version.

$ pip install --user g

Or install it as a uv tool:

$ uv tool install g

Add g to a uv-managed project:

$ uv add g

Run g once without installing globally:

$ uvx g

Upgrade an existing install the same way.

$ pip install --user --upgrade g

With uv:

$ uv tool upgrade g
$ uv add g

Developmental releases

New versions of g are published to PyPI as alpha, beta, or release candidates. In their versions you will see notification like a1, b1, and rc1, respectively. 1.10.0b4 would mean the 4th beta release of 1.10.0 before general availability.

  • pip:

    $ pip install --user --upgrade --pre g
    
  • pipx:

    $ pipx install --suffix=@next 'g' --pip-args '\--pre' --force
    

    Then use the suffixed command:

    $ g@next --help
    
  • uv tool install:

    $ uv tool install --prerelease=allow g
    
  • uv:

    $ uv add g --prerelease allow
    
  • uvx:

    $ uvx --from 'g' --prerelease allow g
    

For unreleased trunk builds, expect breakage:

  • pip:

    $ pip install --user -e git+https://github.com/vcs-python/g.git#egg=g
    
  • uv:

    $ uv tool install git+https://github.com/vcs-python/g.git
    
    $ uv add git+https://github.com/vcs-python/g.git
    
    $ uvx --from git+https://github.com/vcs-python/g.git g --version
    
  • pipx:

    $ pipx install --suffix=@master 'g @ git+https://github.com/vcs-python/g.git@master' --force