Configuration
The gitman.yml configuration file controls which repositories are cloned.
Sources
Represents a repository to clone and options for controlling checkout.
| Key | Purpose | Required | Default |
|---|---|---|---|
repo |
URL of the repository | Yes | |
name |
Directory for checkout | Yes | (inferred) |
rev |
SHA, tag, or branch to checkout | Yes | "main" |
type |
"git" or "git-svn" |
No | "git" |
params |
Additional arguments for clone |
No | null |
sparse_paths |
Controls partial checkout | No | [] |
links |
Creates symlinks within a project | No | [] |
scripts |
Shell commands to run after checkout | No | [] |
patches |
patches to be applied after checkout | No | [] |
Params
Params are passed directly to the clone command to modify behavior such as:
# Shallow clone:
params: --depth=1
# Include submodules:
params: --recurse-submodules
Sparse Paths
See using sparse checkouts for more information.
Links
See using multiple links for more information.
Scripts
Scripts can be used to run post-checkout commands such us build steps. For example:
repo: "https://github.com/koalaman/shellcheck"
scripts:
- brew install cabal-install
- cabal install
Patches
Patches that are applied after checkout. For example:
repo: "https://github.com/koalaman/shellcheck"
patches:
- patchdir/0001-add-something.patch
- patchdir/0002-add-more.patch
create_links(root, *, force=False)
Create links from the source to target directory.
identify(allow_dirty=True, allow_missing=True, skip_changes=False)
Get the path and current repository URL and hash.
lock(rev=None, allow_dirty=False, skip_changes=False, verify_rev=True)
Create a locked source object.
Return a locked version of the current source if not dirty otherwise None.
update_files(force=False, force_interactive=False, fetch=False, clean=True, skip_changes=False)
Ensure the source matches the specified revision.