Package: git-workspace
Git WorkspaceThis script is intended to ease the development in multirepo environment. By defining a workspace file
that contains all the repositories one can easily share the environment setup without the need for manual
git clones. With git configuration user and host can also be set for the repositories. This allows one
to use e.g. multiple bitbucket repositories with different SSH keys easily without altering the host in
each git clone command.This script also provides a command to check the overall state of the workspace (branches, untracked files etc.).
Few commands are overridden, but most are plain passthroughs to git and are run in all of the workspace
repositories.Installation:pipinstall--usergit-workspaceorpip3installgit-workspaceUsageAt first, create a new directory where the workspace will be initialized. There, rungit ws initwhich creates a blank configuration. Fill in at least the remote configuration (examples later in this README).For the repositories, fill those either by hand or if using Gitlab, you can usegit ws gitlab-syncto automatically create a repository list either for a single group (and its subgroups) or for all that you have access to.gitlab-syncrequires you to create a personal access token with Gitlab REST API access rights and supports only v4 API. The token can be saved to the systems secret storage (for details see Keyring python package documentation, but at least KWallet in KDE and Keychain in MacOS are supported). If stored, then the API TOKEN does not need to be filled in later on.NOTICE: Right now, only a single token can be used. Support for multiple different tokens coming soon-ish.Command helpsUsage: git-ws [OPTIONS] COMMAND [ARGS]...

  Git Workspace

  Copyright 2021 Aki Mäkinen
  https://gitlab.com/blissfulreboot/python/git-workspace
  Licensed under MIT license

Options:
  --help  Show this message and exit.

Commands:
  autocomplete        Show the autocomplete line
  cleanup             Move repositories not included in the workspace...
  clone               Clone the repositories listed in the workspace...
  command             Run a command in each workspace git directory
  default-and-update  Stash potential changes, switch to the default...
  gitlab
  gitlab-sync         Sync the workspace to match the state of the gitlab...
  init                Initialize a new blank workspace
  state               Print the state of the repositories in the workspaceUsage: git-ws gitlab [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  sync  Sync the workspace to match the state of the gitlab groupConfigurationIn contrast to the first version of this tool, the configuration resides now in a single YAML file. The format is:repositories:[]remote:gituser:''githost:''api_url:''insecure:falsegitlab-integration:fetch-archived:<boolean, by default the sync no longer fetches archived repositories>suppress-insecure-warning:<boolean, suppresses the urllib3 insecure warnings if set to true>where the repository entries are-path:some/repository/path.gitdirectory:some/repository/pathdefault_branch:mainIf the directory is defined for the repository entry, then the repository will be cloned there, otherwise the structure will be flattened. The default branch is used for thegit ws statecurrently and defaults tomainif not defined.Example:# The remote configuration for gitlab.com using ssh (which is the only officially supported right now)repositories:[]remote:gituser:gitgithost:gitlab.comapi_url:https://gitlab.com/api/v4/insecure:falseNew features in 2.3.1Retry git clonegit ws clonenow has retries for each git clone operation as well as a retry interval. These are hard coded for now, but will be configurable in the futureDefaults are:retry count: 5retry interval: 5 secondsSupport for multiple gitlab personal access tokensAPI URL is used as an identifier.EXPERIMENTAL: Support custom certificatesnew field in the configuration underremote:custom_certificate. This is the absolute path to the file used for verification.Thecustom_certificatefield overrides theinsecurefieldEXPERIMENTAL: autocompletion forgit-wscommandDoes not work withgit ws. See help (git-wsorgit ws) for details.