Edit on GitHub


Assign stage to specific artifact version.


usage: gto assign [-r <text>] [--version <text>]
                  [--stage <text>] [-m <text>]
                  [--simple <text>] [--force] [--push] [--sr]
                  name [ref]

  name             Artifact name
  [ref]            Git reference to use


To assign an actionable stage for a specific artifact version use the same gto assign command. Stages can mark the artifact readiness for a specific consumer. You can plug in a real downsteam system via CI/CD or web hooks, e.g. to redeploy an ML model.

$ gto assign awesome-model --version v0.0.1 --stage prod
Created git tag 'awesome-model#prod#1' that assigns stage to 'v0.0.1'

GTO creates a special Git tag in the standard format.


  • -r <text>, --repo <text> - Local or remote repository [default: .]
  • --version <text> - If you provide REF, this will be used to name new version
  • --stage <text> - Stage to assign
  • -m <text>, --message <text> - Message to annotate the Git tag with
  • --simple <text> - Use simple notation, e.g. rf#prod instead of rf#prod-5 [supported values: auto, true, false] [default: auto]
  • --force - Create the Git tag even if it already exists and is in effect
  • --push - Push created git tag to origin. The value is ignored if the repo option is set to a remote URL. In that case tags are pushed to or created on the remote repo automatically.
  • --sr, --skip-registration - Don't register a version at specified commit
  • -h, --help - Show this message and exit.


Assign artifact "nn" to "prod" at specific Git ref instead of supplying artifact version (note that this will also register a version if it doesn't exist):

$ gto assign nn abcd123 --stage prod

Assign stage at specific Git ref and name the version explicitly (this assumes that version was not registered yet):

$ gto assign nn abcd123 --version v1.0.0 --stage prod

๐Ÿ› Found an issue? Let us know! Or fix it:

Edit on GitHub

โ“ Have a question? Join our chat, we will help you:

Discord Chat