Check out

Using the checkout command, it is possible to checkout out a remote ledger locally.

  ____                                               _
 |  _ \ ___ _ __ _ __ ___   __ _ _   _  __ _ _ __ __| |
 | |_) / _ \ '__| '_ ` _ \ / _` | | | |/ _` | '__/ _` |
 |  __/  __/ |  | | | | | | (_| | |_| | (_| | | | (_| |
 |_|   \___|_|  |_| |_| |_|\__, |\__,_|\__,_|_|  \__,_|
                           |___/

The official Permguard Command Line Interface - Copyright © 2022 Nitro Agility S.r.l.

This command checks out the contents of a remote ledger to the local permguard workspace.

Examples:
  # check out the contents of a remote ledger to the local permguard workspace
  permguard checkout origin/273165098782/magicfarmacia

  Find more information at: https://www.permguard.com/docs/0.0.x/command-line/how-to-use/

Usage:
  permguard checkout [flags]

Flags:
  -h, --help   help for checkout

Global Flags:
  -o, --output string    output format (default "terminal")
  -v, --verbose          true for verbose output
  -w, --workdir string   workdir (default ".")

The output from your current version of Permguard may differ from the example provided on this page.

Check out a ledger

The permguard checkout command allows you to check out a remote ledger locally.

permguard checkout origin/273165098782/magicfarmacia

output:

Ledger magicfarmacia has been added.
JSON Output
permguard checkout origin/273165098782/magicfarmacia --output json

output:

{
  "ledgers": [
    {
      "is_head": true,
      "ref": "refs/remotes/origin/273165098782/fd1ac44e4afa4fc4beec622494d3175a",
      "ledger_id": "fd1ac44e4afa4fc4beec622494d3175a",
      "ledger_uri": "origin/273165098782/branches"
    }
  ]
}