gitSpec top-level property
Completion spec for git CLI
Implementation
final FigSpec gitSpec = FigSpec(
name: 'git',
description: 'Distributed version control system',
generateSpec: gitGenerateSpec,
args: [
Arg(
name: 'alias',
description: 'Custom user defined git alias',
isOptional: true,
generators: gitGenerators['aliases'])
],
options: [
Option(name: '--version', description: 'Output version'),
Option(name: '--help', description: 'Output help'),
Option(
name: '-C',
args: [Arg(name: 'path', template: 'folders')],
description: 'Run as if git was started in <path>'),
Option(
name: '-c',
insertValue: '-c {cursor}',
description: 'Pass a config parameter to the command',
args: [Arg(name: 'name=value')]),
Option(
name: '--exec-path',
args: [Arg(name: 'path', isOptional: true, template: 'folders')],
description: 'Get or set GIT_EXEC_PATH for core Git programs'),
Option(
name: '--html-path',
description: 'Print Git’s HTML documentation path'),
Option(
name: '--man-path',
description: 'Print the manpath for this version of Git'),
Option(
name: '--info-path',
description: 'Print the info path documenting this version of Git'),
Option(
name: ['-p', '--paginate'],
description: 'Pipe output into `less` or custom \$PAGER'),
Option(
name: '--no-pager',
description: 'Do not pipe Git output into a pager'),
Option(
name: '--no-replace-objects',
description: 'Do not use replacement refs'),
Option(
name: '--no-optional-locks',
description:
'Do not perform optional operations that require lock files'),
Option(
name: '--bare',
description: 'Treat the repository as a bare repository'),
Option(
name: '--git-dir',
args: [Arg(name: 'path', template: 'folders')],
description: 'Set the path to the repository dir (`.git`)'),
Option(
name: '--work-tree',
args: [Arg(name: 'path', template: 'folders')],
description: 'Set working tree path'),
Option(
name: '--namespace',
args: [Arg(name: 'name')],
description: 'Set the Git namespace')
],
subcommands: [
Subcommand(
name: 'archive',
description: 'Create an archive of files from a named tree',
args: [
Arg(name: 'tree-ish', generators: gitGenerators['treeish']),
Arg(
name: 'path',
template: 'filepaths',
isVariadic: true,
isOptional: true)
],
options: [
Option(name: '--format', description: 'Archive format', args: [
Arg(name: 'fmt', suggestions: [
FigSuggestion(name: 'tar'),
FigSuggestion(name: 'zip')
])
]),
Option(
name: '--prefix',
description: 'Prepend prefix to each pathname in the archive',
args: [Arg(name: 'prefix')]),
Option(
name: '--add-file',
description: 'Add untracked file to archive',
args: [Arg(name: 'file', template: 'filepaths')]),
Option(
name: ['-o', '--output'],
description: 'Write the archive to this file',
args: [Arg(name: 'file', template: 'filepaths')]),
Option(
name: '--worktree-attributes',
description: 'Read .gitattributes in working directory'),
Option(
name: ['-v', '--verbose'],
description: 'Report archived files on stderr'),
Option(
name: '-NUM',
insertValue: '-',
description: 'Set compression level'),
Option(
name: ['-l', '--list'],
description: 'List supported archive formats'),
Option(
name: '--remote',
description:
'Retrieve the archive from remote repository <repo>',
args: [Arg(name: 'repo')]),
Option(
name: '--exec',
description: 'Path to the remote git-upload-archive command',
args: [Arg(name: 'command')])
]),
Subcommand(name: 'blame', args: [
Arg(name: 'file', template: 'filepaths')
], options: [
Option(
name: '--incremental',
description: 'Show blame entries as we find them, incrementally'),
Option(
name: '-b',
description:
'Do not show object names of boundary commits (Default: off)'),
Option(
name: '--root',
description:
'Do not treat root commits as boundaries (Default: off)'),
Option(name: '--show-stats', description: 'Show work cost statistics'),
Option(name: '--progress', description: 'Force progress reporting'),
Option(
name: '--score-debug',
description: 'Show output score for blame entries'),
Option(
name: ['-f', '--show-name'],
description: 'Show original filename (Default: auto)'),
Option(
name: ['-n', '--show-number'],
description: 'Show original linenumber (Default: off)'),
Option(
name: ['-p', '--porcelain'],
description: 'Show in a format designed for machine consumption'),
Option(
name: '--line-porcelain',
description:
'Show porcelain format with per-line commit information'),
Option(
name: '-c',
description:
'Use the same output mode as git-annotate (Default: off)'),
Option(name: '-t', description: 'Show raw timestamp (Default: off)'),
Option(name: '-l', description: 'Show long commit SHA1 (Default: off)'),
Option(
name: '-s',
description: 'Suppress author name and timestamp (Default: off)'),
Option(
name: ['-e', '--show-email'],
description: 'Show author email instead of name (Default: off)'),
Option(name: '-w', description: 'Ignore whitespace differences'),
Option(
name: '--ignore-rev',
description: 'Ignore <rev> when blaming',
args: [Arg(name: 'rev', generators: gitGenerators['revs'])]),
Option(
name: '--ignore-revs-file',
description: 'Ignore revisions from <file>',
args: [Arg(name: 'file', template: 'filepaths')]),
Option(
name: '--color-lines',
description:
'Color redundant metadata from previous line differently'),
Option(name: '--color-by-age', description: 'Color lines by age'),
Option(
name: '--minimal',
description: 'Spend extra cycles to find better match'),
Option(
name: '-S',
description:
'Use revisions from <file> instead of calling git-rev-list',
args: [Arg(name: 'file', template: 'filepaths')]),
Option(
name: '--contents',
description: 'Use <file>\'s contents as the final image',
args: [Arg(name: 'file', template: 'filepaths')]),
Option(
name: '-C',
insertValue: '-C{cursor}',
description: 'Find line copies within and across files'),
Option(
name: '-M',
insertValue: '-M{cursor}',
description: 'Find line movements within and across files'),
Option(
name: '-L',
description:
'Process only line range <start>,<end> or function :<funcname>',
args: [Arg(name: 'start,end')]),
Option(
name: '--abbrev',
description: 'Use <n> digits to display object names',
args: [Arg(name: 'n', isOptional: true)])
]),
Subcommand(
name: 'commit',
description: 'Record changes to the repository',
args: [
Arg(
name: 'pathspec',
isOptional: true,
isVariadic: true,
template: 'filepaths')
],
options: [
Option(
name: ['-m', '--message'],
description: 'Use the given message as the commit message',
args: [
Arg(
name: 'message',
// generators: TS uses ai({ name: "git commit -m", prompt: ... }); not available in Dart
generators: null)
]),
Option(
name: ['-a', '--all'],
description: 'Stage all modified and deleted paths'),
Option(
name: '-am',
insertValue: '-am \'{cursor}\'',
description: 'Stage all and use given text as commit message',
args: [Arg(name: 'message')]),
Option(
name: ['-v', '--verbose'],
description: 'Show unified diff of all file changes'),
Option(
name: ['-p', '--patch'],
description:
'Use the interactive patch selection interface to chose which changes to commi'),
Option(
name: ['-C', '--reuse-message'],
description:
'Take an existing commit object, and reuse the log message and the authorship',
args: [
Arg(name: 'commit', generators: gitGenerators['commits'])
]),
Option(
name: ['-c', '--reedit-message'],
description:
'Like -C, but with -c the editor is invoked, so that the user can further edit',
args: [
Arg(name: 'commit', generators: gitGenerators['commits'])
]),
Option(
name: '--fixup',
description:
'Construct a commit message for use with rebase --autosquash. The commit messa',
args: [
Arg(name: 'commit', generators: gitGenerators['commits'])
]),
Option(
name: '--squash',
description:
'Construct a commit message for use with rebase --autosquash. The commit messa',
args: [
Arg(name: 'commit', generators: gitGenerators['commits'])
]),
Option(
name: '--reset-author',
description:
'When used with -C/-c/--amend options, or when committing after a conflicting'),
Option(
name: '--short',
description:
'When doing a dry-run, give the output in the short-format. See git-status[1]'),
Option(
name: '--branch',
description:
'Show the branch and tracking info even in short-format'),
Option(
name: '--porcelain',
description:
'When doing a dry-run, give the output in a porcelain-ready format. See git-st'),
Option(
name: '--long',
description:
'When doing a dry-run, give the output in the long-format. Implies --dry-run'),
Option(
name: ['-z', '--null'],
description:
'When showing short or porcelain status output, print the filename verbatim an'),
Option(
name: ['-F', '--file'],
description:
'Take the commit message from the given file. Use - to read the message from t',
args: [Arg(name: 'file', template: 'filepaths')]),
Option(
name: '--author',
description:
'Override the commit author. Specify an explicit author using the standard A U',
args: [Arg(name: 'author')]),
Option(
name: '--date',
description: 'Override the author date used in the commit',
args: [Arg(name: 'date')]),
Option(
name: ['-t', '--template'],
description:
'When editing the commit message, start the editor with the contents in the gi',
args: [Arg(name: 'file', template: 'filepaths')]),
Option(
name: ['-s', '--signoff'],
description:
'Add a Signed-off-by trailer by the committer at the end of the commit log mes'),
Option(
name: '--no-signoff',
description:
'Don\'t add a Signed-off-by trailer by the committer at the end of the commit l'),
Option(
name: ['-n', '--no-verify'],
description:
'This option bypasses the pre-commit and commit-msg hooks. See also githooks[5]'),
Option(
name: '--allow-empty',
description:
'Usually recording a commit that has the exact same tree as its sole parent co'),
Option(
name: '--allow-empty-message',
description:
'Like --allow-empty this command is primarily for use by foreign SCM interface'),
Option(
name: '--cleanup',
description:
'This option determines how the supplied commit message should be cleaned up b',
args: [
Arg(
name: 'mode',
description:
'Determines how the supplied commit messaged should be cleaned up before committing',
suggestions: [
FigSuggestion(
name: 'strip',
description:
'Strip leading and trailing empty lines, trailing whitepace, commentary and collapse consecutive empty lines'),
FigSuggestion(
name: 'whitespace',
description:
'Same as strip except #commentary is not removed'),
FigSuggestion(
name: 'verbatim',
description: 'Do not change the message at all'),
FigSuggestion(
name: 'scissors',
description:
'Same as whitespace except that everything from (and including) the line found below is truncated'),
FigSuggestion(
name: 'default',
description:
'Same as strip if the message is to be edited. Otherwise whitespace')
])
]),
Option(
name: ['-e', '--edit'],
description:
'The message taken from file with -F, command line with -m, and from commit ob'),
Option(
name: '--no-edit',
description:
'Use the selected commit message without launching an editor. For example, git'),
Option(
name: '--amend',
description:
'Replace the tip of the current branch by creating a new commit. The recorded'),
Option(
name: '--no-post-rewrite',
description: 'Bypass the post-rewrite hook'),
Option(
name: ['-i', '--include'],
description:
'Before making a commit out of staged contents so far, stage the contents of p'),
Option(
name: ['-o', '--only'],
description:
'Make a commit by taking the updated working tree contents of the paths specif'),
Option(
name: '--pathspec-from-file',
description:
'Pathspec is passed in instead of commandline args. If is exactly - then stand',
args: [Arg(name: 'file', template: 'filepaths')]),
Option(
name: '--pathspec-file-nul',
description:
'Only meaningful with --pathspec-from-file. Pathspec elements are separated wi'),
Option(
name: ['-u', '--untracked-files'],
description:
'Show untracked files. The mode parameter is optional (defaults to all), and i',
args: [
Arg(
name: 'mode',
suggestions: [
FigSuggestion(name: 'no'),
FigSuggestion(name: 'normal'),
FigSuggestion(name: 'all')
],
isOptional: true)
]),
Option(
name: ['-q', '--quiet'],
description: 'Suppress commit summary message'),
Option(
name: '--dry-run',
description:
'Do not create a commit, but show a list of paths that are to be committed, pa'),
Option(
name: '--status',
description:
'Include the output of git-status[1] in the commit message template when using'),
Option(
name: '--no-status',
description:
'Do not include the output of git-status[1] in the commit message template whe'),
Option(
name: ['-S', '--gpg-sign'],
description:
'GPG-sign commits. The keyid argument is optional and defaults to the committe',
args: [Arg(name: 'keyid', isOptional: true)]),
Option(name: '--no-gpg-sign', description: 'Dont GPG-sign commits'),
Option(
name: '--',
description: 'Do not interpret any more arguments as options')
]),
Subcommand(
name: 'config',
description: 'Change Git configuration',
options: [
Option(
name: '--local',
description:
'Default: write to the repository .git/config file',
args: [
Arg(isVariadic: true, suggestions: [
FigSuggestion(
name: 'user.name',
description: 'Set config for username',
insertValue: 'user.name \'{cursor}\''),
FigSuggestion(
name: 'user.email',
description: 'Set config for email',
insertValue: 'user.email \'{cursor}\'')
])
]),
Option(
name: '--global',
description:
'For writing options: write to global ~/.gitconfig file rather than the repository .git/config'),
Option(
name: '--replace-all',
description:
'Default behavior is to replace at most one line. This replaces all lines matc'),
Option(
name: '--add',
description:
'Adds a new line to the option without altering any existing values. This is t'),
Option(
name: '--get',
description:
'Get the value for a given key (optionally filtered by a regex matching the va'),
Option(
name: '--get-all',
description:
'Like get, but returns all values for a multi-valued key'),
Option(
name: '--get-regexp',
description:
'Like --get-all, but interprets the name as a regular expression and writes ou',
args: [Arg(name: 'regexp')]),
Option(
name: '--get-urlmatch',
description:
'When given a two-part name section.key, the value for section..key whose part',
args: [Arg(name: 'name'), Arg(name: 'url')]),
Option(
name: '--system',
description:
'For writing options: write to system-wide \$(prefix)/etc/gitconfig rather than'),
Option(
name: '--worktree',
description:
'Similar to --local except that.git/config.worktree is read from or written to'),
Option(
name: ['-f', '--file'],
description:
'Use the given config file instead of the one specified by GIT_CONFIG',
args: [Arg(name: 'config-file', template: 'filepaths')]),
Option(
name: '--blob',
description:
'Similar to --file but use the given blob instead of a file. E.g. you can use',
args: [Arg(name: 'blob')]),
Option(
name: '--remove-section',
description:
'Remove the given section from the configuration file'),
Option(
name: '--rename-section',
description: 'Rename the given section to a new name'),
Option(
name: '--unset',
description:
'Remove the line matching the key from config file'),
Option(
name: '--unset-all',
description:
'Remove all lines matching the key from config file'),
Option(
name: ['-l', '--list'],
description:
'List all variables set in config file, along with their values'),
Option(
name: '--fixed-value',
description:
'When used with the value-pattern argument, treat value-pattern as an exact st'),
Option(
name: '--type',
description:
'Git config will ensure that any input or output is valid under the given type',
args: [
Arg(name: 'type', suggestions: [
FigSuggestion(name: 'bool'),
FigSuggestion(name: 'int'),
FigSuggestion(name: 'bool-or-int'),
FigSuggestion(name: 'path'),
FigSuggestion(name: 'expiry-date'),
FigSuggestion(name: 'color')
])
]),
Option(
name: '--no-type',
description:
'Un-sets the previously set type specifier (if one was previously set). This o'),
Option(
name: ['-z', '--null'],
description:
'For all options that output values and/or keys, always end values with the nu'),
Option(
name: '--name-only',
description:
'Output only the names of config variables for --list or --get-regexp'),
Option(
name: '--show-origin',
description:
'Augment the output of all queried config options with the origin type (file'),
Option(
name: '--show-scope',
description:
'Similar to --show-origin in that it augments the output of all queried config'),
Option(
name: '--get-colorbool',
description:
'Find the color setting for name (e.g. color.diff) and output "true" or "false',
args: [Arg(name: 'name')]),
Option(
name: '--get-color',
description:
'Find the color configured for name (e.g. color.diff.new) and output it as the',
args: [
Arg(name: 'name'),
Arg(name: 'default', isOptional: true)
]),
Option(
name: ['-e', '--edit'],
description:
'Opens an editor to modify the specified config file; either --system, --globa'),
Option(
name: '--includes',
description:
'Respect include.* directives in config files when looking up values. Defaults'),
Option(
name: '--no-includes',
description:
'Respect include.* directives in config files when looking up values. Defaults'),
Option(
name: '--default',
description:
'When using --get, and the requested variable is not found, behave as if were',
args: [Arg(name: 'value', isOptional: true)])
],
args: [
Arg(
name: 'setting',
suggestions: configSuggestions
.map((s) => FigSuggestion(
name: s.name,
displayName: s.displayName,
description: s.description,
icon: '⚙️',
priority: s.priority,
insertValue: s.insertValue,
replaceValue: s.replaceValue,
type: s.type,
hidden: s.hidden,
isDangerous: s.isDangerous,
deprecated: s.deprecated,
previewComponent: s.previewComponent,
loadSpec: s.loadSpec))
.toList(),
generators: [
Generator(
script: ['git', 'config', '--get-regexp', '.*'],
postProcess: (out, [tokens]) {
return out
.trim()
.split('\n')
.map((line) => line.indexOf(' ') != -1
? line.substring(0, line.indexOf(' '))
: line)
.where((line) =>
line.startsWith('alias.') ||
line.startsWith('branch.') ||
line.startsWith('remote.') ||
!configSuggestions
.any((s) => s.nameSingle == line))
.map((name) => FigSuggestion(name: name, icon: '⚙️'))
.toList();
},
),
]),
Arg(name: 'value')
]),
Subcommand(
name: 'rebase',
description: 'Reapply commits on top of another base tip',
options: [
Option(
name: '--onto',
description:
'Starting point at which to create the new commits. If the --onto option is not specified, the starting point is <upstream>. May be any valid commit, and not just an existing branch name. As a special case, you may use \'A...B\' as a shortcut for the merge base of A and B if there is exactly one merge base. You can leave out at most one of A and B, in which case it defaults to HEAD',
args: [
Arg(name: 'newbase', generators: gitGenerators['commits'])
]),
Option(
name: '--keep-base',
description:
'Set the starting point at which to create the new commits to the merge base of <upstream> <branch>. Running git rebase --keep-base <upstream> <branch> is equivalent to running git rebase --onto <upstream>… <upstream>. This option is useful in the case where one is developing a feature on top of an upstream branch. While the feature is being worked on, the upstream branch may advance and it may not be the best idea to keep rebasing on top of the upstream but to keep the base commit as-is. Although both this option and --fork-point find the merge base between <upstream> and <branch>, this option uses the merge base as the starting point on which new commits will be created, whereas --fork-point uses the merge base to determine the set of commits which will be rebased'),
Option(
name: '--continue',
description:
'Restart the rebasing process after having resolved a merge conflict'),
Option(
name: '--abort',
description:
'Abort the rebase operation and reset HEAD to the original branch. If <branch> was provided when the rebase operation was started, then HEAD will be reset to <branch>. Otherwise HEAD will be reset to where it was when the rebase operation was started'),
Option(
name: '--quit',
description:
'Abort the rebase operation but HEAD is not reset back to the original branch. The index and working tree are also left unchanged as a result. If a temporary stash entry was created using --autostash, it will be saved to the stash list'),
Option(
name: '--apply',
description:
'Use applying strategies to rebase (calling git-am internally). This option may become a no-op in the future once the merge backend handles everything the apply one does'),
Option(
name: '--empty',
description:
'How to handle commits that are not empty to start and are not clean cherry-picks of any upstream commit, but which become empty after rebasing (because they contain a subset of already upstream changes). With drop (the default), commits that become empty are dropped. With keep, such commits are kept. With ask (implied by --interactive), the rebase will halt when an empty commit is applied allowing you to choose whether to drop it, edit files more, or just commit the empty changes. Other options, like --exec, will use the default of drop unless -i/--interactive is explicitly specified. Note that commits which start empty are kept (unless --no-keep-empty is specified), and commits which are clean cherry-picks (as determined by git log --cherry-mark ...) are detected and dropped as a preliminary step (unless --reapply-cherry-picks is passed)',
args: [
Arg(isOptional: true, suggestions: [
FigSuggestion(name: 'drop'),
FigSuggestion(name: 'keep'),
FigSuggestion(name: 'ask')
])
]),
Option(
name: '--no-keep-empty',
description:
'Do not keep commits that start empty before the rebase (i.e. that do not change anything from its parent) in the result. The default is to keep commits which start empty, since creating such commits requires passing the --allow-empty override flag to git commit, signifying that a user is very intentionally creating such a commit and thus wants to keep it. Usage of this flag will probably be rare, since you can get rid of commits that start empty by just firing up an interactive rebase and removing the lines corresponding to the commits you don’t want. This flag exists as a convenient shortcut, such as for cases where external tools generate many empty commits and you want them all removed. For commits which do not start empty but become empty after rebasing, see the --empty flag'),
Option(
name: '--keep-empty',
description:
'Keep commits that start empty before the rebase (i.e. that do not change anything from its parent) in the result. The default is to keep commits which start empty, since creating such commits requires passing the --allow-empty override flag to git commit, signifying that a user is very intentionally creating such a commit and thus wants to keep it. Usage of this flag will probably be rare, since you can get rid of commits that start empty by just firing up an interactive rebase and removing the lines corresponding to the commits you don’t want. This flag exists as a convenient shortcut, such as for cases where external tools generate many empty commits and you want them all removed. For commits which do not start empty but become empty after rebasing, see the --empty flag'),
Option(
name: '--reapply-cherry-picks',
description:
'Reapply all clean cherry-picks of any upstream commit instead of preemptively dropping them. (If these commits then become empty after rebasing, because they contain a subset of already upstream changes, the behavior towards them is controlled by the --empty flag). By default (or if --no-reapply-cherry-picks is given), these commits will be automatically dropped. Because this necessitates reading all upstream commits, this can be expensive in repos with a large number of upstream commits that need to be read. --reapply-cherry-picks allows rebase to forgo reading all upstream commits, potentially improving performance'),
Option(
name: '--no-reapply-cherry-picks',
description:
'Do not reapply all clean cherry-picks of any upstream commit instead of preemptively dropping them'),
Option(
name: '--allow-empty-message',
description:
'No-op. Rebasing commits with an empty message used to fail and this option would override that behavior, allowing commits with empty messages to be rebased. Now commits with an empty message do not cause rebasing to halt'),
Option(
name: '--skip',
description:
'Restart the rebasing process by skipping the current patch'),
Option(
name: '--edit-todo',
description: 'Edit the todo list during an interactive rebase'),
Option(
name: '--show-current-patch',
description:
'Show the current patch in an interactive rebase or when rebase is stopped because of conflicts. This is the equivalent of git show REBASE_HEAD'),
Option(
name: ['-m', '--merge'],
description:
'Use merging strategies to rebase. When the recursive (default) merge strategy is used, this allows rebase to be aware of renames on the upstream side. This is the default. Note that a rebase merge works by replaying each commit from the working branch on top of the <upstream> branch. Because of this, when a merge conflict happens, the side reported as ours is the so-far rebased series, starting with <upstream>, and theirs is the working branch. In other words, the sides are swapped'),
Option(
name: ['-s', '--strategy'],
isRepeatable: true,
description:
'Use the given merge strategy. If there is no -s option git merge-recursive is used instead. This implies --merge. Because git rebase replays each commit from the working branch on top of the <upstream> branch using the given strategy, using the ours strategy simply empties all patches from the <branch>, which makes little sense',
args: [
Arg(name: 'strategy', isVariadic: true, suggestions: [
FigSuggestion(name: 'resolve'),
FigSuggestion(name: 'recursive'),
FigSuggestion(name: 'octopus'),
FigSuggestion(name: 'ours'),
FigSuggestion(name: 'subtree')
])
]),
Option(
name: ['-X', '--strategy-option'],
description:
'Pass the <strategy-option> through to the merge strategy. This implies --merge and, if no strategy has been specified, -s recursive. Note the reversal of ours and theirs as noted above for the -m option',
args: [
Arg(name: 'option', suggestions: [
FigSuggestion(name: 'ours'),
FigSuggestion(name: 'theirs'),
FigSuggestion(name: 'patience'),
FigSuggestion(name: 'diff-algorithm'),
FigSuggestion(name: 'diff-algorithm=patience'),
FigSuggestion(name: 'diff-algorithm=minimal'),
FigSuggestion(name: 'diff-algorithm=histogram'),
FigSuggestion(name: 'diff-algorithm=myers'),
FigSuggestion(name: 'ignore-space-change'),
FigSuggestion(name: 'ignore-all-space'),
FigSuggestion(name: 'ignore-space-at-eol'),
FigSuggestion(name: 'ignore-cr-at-eol'),
FigSuggestion(name: 'renormalize'),
FigSuggestion(name: 'no-renormalize'),
FigSuggestion(name: 'no-renames'),
FigSuggestion(name: 'find-renames'),
FigSuggestion(name: 'subtree')
])
]),
Option(
name: '--rerere-autoupdate',
description:
'Allow the rerere mechanism to update the index with the result of auto-conflict resolution if possible'),
Option(
name: '--no-rerere-autoupdate',
description:
'Allow the rerere mechanism to update the index with the result of auto-conflict resolution if possible'),
Option(
name: ['-S', '--gpg-sign'],
description:
'GPG-sign commits. The keyid argument is optional and defaults to the committer identity; if specified, it must be stuck to the option without a space. --no-gpg-sign is useful to countermand both commit.gpgSign configuration variable, and earlier --gpg-sign',
args: [Arg(name: 'keyid', isOptional: true)]),
Option(
name: '--no-gpg-sign',
description:
'Do not GPG-sign commits.--no-gpg-sign is useful to countermand both commit.gpgSign configuration variable, and earlier --gpg-sign'),
Option(
name: ['-q', '--quiet'],
description: 'Be quiet. Implies --no-stat'),
Option(
name: ['-v', '--verbose'],
description: 'Be verbose. Implies --stat'),
Option(
name: '--stat',
description:
'Show a diffstat of what changed upstream since the last rebase. The diffstat is also controlled by the configuration option rebase.stat'),
Option(
name: ['-n', '--no-stat'],
description:
'Do not show a diffstat as part of the rebase process'),
Option(
name: '--no-verify',
description:
'This option bypasses the pre-rebase hook. See also githooks[5]'),
Option(
name: '--verify',
description:
'Allows the pre-rebase hook to run, which is the default. This option can be used to override --no-verify. See also githooks[5]'),
Option(
name: '-C',
description:
'Ensure at least <n> lines of surrounding context match before and after each change. When fewer lines of surrounding context exist they all must match. By default no context is ever ignored. Implies --apply',
args: [Arg(name: 'n')]),
Option(
name: ['--no-ff', '--force-rebase', '-f'],
description:
'Individually replay all rebased commits instead of fast-forwarding over the unchanged ones. This ensures that the entire history of the rebased branch is composed of new commits. You may find this helpful after reverting a topic branch merge, as this option recreates the topic branch with fresh commits so it can be remerged successfully without needing to \'revert the reversion\' (see the revert-a-faulty-merge How-To for details)'),
Option(
name: '--fork-point',
description:
'Use reflog to find a better common ancestor between <upstream> and <branch> when calculating which commits have been introduced by <branch>. When --fork-point is active, fork_point will be used instead of <upstream> to calculate the set of commits to rebase, where fork_point is the result of git merge-base --fork-point <upstream> <branch> command (see git-merge-base[1]). If fork_point ends up being empty, the <upstream> will be used as a fallback. If <upstream> is given on the command line, then the default is --no-fork-point, otherwise the default is --fork-point. If your branch was based on <upstream> but <upstream> was rewound and your branch contains commits which were dropped, this option can be used with --keep-base in order to drop those commits from your branch'),
Option(
name: '--no-fork-point',
description:
'Do not use reflog to find a better common ancestor between <upstream> and <branch> when calculating which commits have been introduced by <branch>. When --fork-point is active, fork_point will be used instead of <upstream> to calculate the set of commits to rebase, where fork_point is the result of git merge-base --fork-point <upstream> <branch> command (see git-merge-base[1]). If fork_point ends up being empty, the <upstream> will be used as a fallback. If <upstream> is given on the command line, then the default is --no-fork-point, otherwise the default is --fork-point. If your branch was based on <upstream> but <upstream> was rewound and your branch contains commits which were dropped, this option can be used with --keep-base in order to drop those commits from your branch'),
Option(
name: '--ignore-whitespace',
description:
'Ignore whitespace differences when trying to reconcile differences. Currently, each backend implements an approximation of this behavior: apply backend: When applying a patch, ignore changes in whitespace in context lines. Unfortunately, this means that if the \'old\' lines being replaced by the patch differ only in whitespace from the existing file, you will get a merge conflict instead of a successful patch application. merge backend: Treat lines with only whitespace changes as unchanged when merging. Unfortunately, this means that any patch hunks that were intended to modify whitespace and nothing else will be dropped, even if the other side had no changes that conflicted'),
Option(
name: '--whitespace',
description:
'This flag is passed to the git apply program (see git-apply[1]) that applies the patch. Implies --apply',
args: [Arg(name: 'option')]),
Option(
name: '--committer-date-is-author-date',
description:
'Instead of using the current time as the committer date, use the author date of the commit being rebased as the committer date. This option implies --force-rebase'),
Option(
name: ['--ignore-date', '--reset-author-date'],
description:
'Instead of using the author date of the original commit, use the current time as the author date of the rebased commit. This option implies --force-rebase'),
Option(
name: '--signoff',
description:
'Add a Signed-off-by trailer to all the rebased commits. Note that if --interactive is given then only commits marked to be picked, edited or reworded will have the trailer added'),
Option(
name: ['-i', '--interactive'],
description:
'Make a list of the commits which are about to be rebased. Let the user edit that list before rebasing. This mode can also be used to split commits (see SPLITTING COMMITS below). The commit list format can be changed by setting the configuration option rebase.instructionFormat. A customized instruction format will automatically have the long commit hash prepended to the format'),
Option(
name: ['-r', '--rebase-merges'],
description:
'By default, a rebase will simply drop merge commits from the todo list, and put the rebased commits into a single, linear branch. With --rebase-merges, the rebase will instead try to preserve the branching structure within the commits that are to be rebased, by recreating the merge commits. Any resolved merge conflicts or manual amendments in these merge commits will have to be resolved/re-applied manually. By default, or when no-rebase-cousins was specified, commits which do not have <upstream> as direct ancestor will keep their original branch point, i.e. commits that would be excluded by git-log[1]\'s --ancestry-path option will keep their original ancestry by default. If the rebase-cousins mode is turned on, such commits are instead rebased onto <upstream> (or <onto>, if specified). The --rebase-merges mode is similar in spirit to the deprecated --preserve-merges but works with interactive rebases, where commits can be reordered, inserted and dropped at will. It is currently only possible to recreate the merge commits using the recursive merge strategy; Different merge strategies can be used only via explicit exec git merge -s <strategy> [...] commands',
args: [
Arg(name: 'mode', isOptional: true, suggestions: [
FigSuggestion(name: 'rebase-cousins'),
FigSuggestion(name: 'no-rebase-cousins')
])
]),
Option(
name: ['-x', '--exec'],
insertValue: '-x \'{cursor}\'',
description:
'Append \'exec <cmd>\' after each line creating a commit in the final history. <cmd> will be interpreted as one or more shell commands. Any command that fails will interrupt the rebase, with exit code 1. You may execute several commands by either using one instance of --exec with several commands: git rebase -i --exec \'cmd1 && cmd2 && ...\' or by giving more than one --exec: git rebase -i --exec \'cmd1\' --exec \'cmd2\' --exec ... If --autosquash is used, \'exec\' lines will not be appended for the intermediate commits, and will only appear at the end of each squash/fixup series. This uses the --interactive machinery internally, but it can be run without an explicit --interactive',
args: [Arg(name: 'cmd')]),
Option(
name: '--root',
description:
'Rebase all commits reachable from <branch>, instead of limiting them with an <upstream>. This allows you to rebase the root commit(s) on a branch. When used with --onto, it will skip changes already contained in <newbase> (instead of <upstream>) whereas without --onto it will operate on every change. When used together with both --onto and --preserve-merges, all root commits will be rewritten to have <newbase> as parent instead'),
Option(
name: '--autosquash',
description:
'When the commit log message begins with \'squash! …\' (or \'fixup! …\'), and there is already a commit in the todo list that matches the same ..., automatically modify the todo list of rebase -i so that the commit marked for squashing comes right after the commit to be modified, and change the action of the moved commit from pick to squash (or fixup). A commit matches the ... if the commit subject matches, or if the ... refers to the commit’s hash. As a fall-back, partial matches of the commit subject work, too. The recommended way to create fixup/squash commits is by using the --fixup/--squash options of git-commit[1]'),
Option(
name: '--no-autosquash',
description:
'When the commit log message begins with \'squash! …\' (or \'fixup! …\'), and there is already a commit in the todo list that matches the same ..., automatically modify the todo list of rebase -i so that the commit marked for squashing comes right after the commit to be modified, and change the action of the moved commit from pick to squash (or fixup). A commit matches the ... if the commit subject matches, or if the ... refers to the commit’s hash. As a fall-back, partial matches of the commit subject work, too. The recommended way to create fixup/squash commits is by using the --fixup/--squash options of git-commit[1]'),
Option(
name: '--autostash',
description:
'Automatically create a temporary stash entry before the operation begins, and apply it after the operation ends. This means that you can run rebase on a dirty worktree. However, use with care: the final stash application after a successful rebase might result in non-trivial conflicts'),
Option(
name: '--no-autostash',
description:
'Do not automatically create a temporary stash entry before the operation begins, and apply it after the operation ends. This means that you can run rebase on a dirty worktree. However, use with care: the final stash application after a successful rebase might result in non-trivial conflicts'),
Option(
name: '--reschedule-failed-exec',
description:
'Automatically reschedule exec commands that failed. This only makes sense in interactive mode (or when an --exec option was provided)'),
Option(
name: '--no-reschedule-failed-exec',
description:
'Do not automatically reschedule exec commands that failed. This only makes sense in interactive mode (or when an --exec option was provided)')
],
args: [
Arg(
name: 'base',
generators: gitGenerators['localBranches'],
suggestions: [
FigSuggestion(
name: '-', description: 'Use the last ref as the base')
],
filterStrategy: 'fuzzy',
isOptional: true),
Arg(
name: 'new base',
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy',
isOptional: true)
]),
Subcommand(
name: 'add',
description: 'Add file contents to the index',
options: addOptions,
args: [
Arg(
name: 'pathspec',
isVariadic: true,
isOptional: true,
generators: [
gitGenerators['files_for_staging'],
Generator(template: 'folders')
])
]),
Subcommand(
name: 'stage',
description: 'Add file contents to the staging area',
options: addOptions,
args: [
Arg(
name: 'pathspec',
isVariadic: true,
isOptional: true,
generators: gitGenerators['files_for_staging'])
]),
Subcommand(
name: 'status',
description: 'Show the working tree status',
options: [
Option(
name: ['-s', '--short'],
description: 'Give the output in the short-format'),
Option(name: ['-v', '--verbose'], description: 'Be verbose'),
Option(
name: ['-b', '--branch'],
description: 'Show branch information'),
Option(name: '--show-stash', description: 'Show stash information'),
Option(
name: '--porcelain',
description: 'Give the output in the short-format',
args: [Arg(name: 'version', isOptional: true)]),
Option(
name: '--ahead-behind',
description: 'Display full ahead/behind values'),
Option(
name: '--no-ahead-behind',
description: 'Do not display full ahead/behind values'),
Option(
name: '--column',
description: 'Display full ahead/behind values',
args: [
Arg(
name: 'options',
description: 'Defaults to always',
isOptional: true)
]),
Option(
name: '--no-column',
description: 'Do not display untracked files in columns',
args: [
Arg(
name: 'options',
description: 'Defaults to never',
isOptional: true)
]),
Option(
name: '--long',
description: 'Show status in long format (default)'),
Option(
name: ['-z', '--null'],
description: 'Terminate entries with NUL'),
Option(
name: ['-u', '--untracked-files'],
description: 'Show untracked files',
args: [
Arg(isOptional: true, suggestions: [
FigSuggestion(name: 'all', description: '(Default)'),
FigSuggestion(name: 'normal'),
FigSuggestion(name: 'no')
])
]),
Option(
name: '--ignore-submodules',
description:
'Ignore changes to submodules when looking for changes',
args: [
Arg(name: 'when', isOptional: true, suggestions: [
FigSuggestion(name: 'all', description: '(Default)'),
FigSuggestion(name: 'dirty'),
FigSuggestion(name: 'untracked'),
FigSuggestion(name: 'none')
])
]),
Option(name: '--ignored', description: 'Show ignored files', args: [
Arg(isOptional: true, suggestions: [
FigSuggestion(name: 'traditional', description: '(Default)'),
FigSuggestion(name: 'matching'),
FigSuggestion(name: 'no')
])
]),
Option(name: '--no-renames', description: 'Do not detect renames'),
Option(
name: '--renames',
description:
'Turn on rename detection regardless of user configuration'),
Option(
name: '--find-renames',
description:
'Turn on rename detection, optionally setting the similarity threshold',
args: [Arg(name: 'n', isOptional: true)])
],
args: [
Arg(
name: 'pathspec',
isVariadic: true,
isOptional: true,
generators: gitGenerators['files_for_staging'])
]),
Subcommand(
name: 'clean',
description:
'Shows which files would be removed from working directory',
options: [
Option(
name: '-d',
description:
'Normally, when no <path> is specified, git clean will not recurse into untracked directories to avoid removing too much. Specify -d to have it recurse into such directories as well. If any paths are specified, -d is irrelevant; all untracked files matching the specified paths (with exceptions for nested git directories mentioned under --force) will be removed'),
Option(
name: ['-f', '--force'],
description:
'If the Git configuration variable clean.requireForce is not set to false, git clean will refuse to delete files or directories unless given -f or -i'),
Option(
name: ['-i', '--interactive'],
description:
'Show what would be done and clean files interactively'),
Option(
name: ['-n', '--dry-run'],
description:
'Don’t actually remove anything, just show what would be done'),
Option(
name: ['-q', '--quiet'],
description:
'Be quiet, only report errors, but not the files that are successfully removed'),
Option(
name: ['-e', '--exclude'],
description:
'Use the given exclude pattern in addition to the standard ignore rules',
args: [Arg(name: 'pattern')]),
Option(
name: '-x',
description:
'Don’t use the standard ignore rules (see gitignore(5)), but still use the ignore rules given with -e options from the command line. This allows removing all untracked files, including build products. This can be used (possibly in conjunction with git restore or git reset) to create a pristine working directory to test a clean build'),
Option(
name: '-X',
description:
'Remove only files ignored by Git. This may be useful to rebuild everything from scratch, but keep manually created files')
],
args: [
Arg(name: 'path', template: 'filepaths')
]),
Subcommand(
name: 'revert',
description:
'Create new commit that undoes all of the changes made in <commit>, then apply it to the current branch',
args: [
Arg(
name: 'commit',
isOptional: true,
generators: gitGenerators['commits'])
]),
Subcommand(
name: 'ls-remote',
description: 'List references in a remote repository'),
Subcommand(name: 'push', description: 'Update remote refs', options: [
Option(
name: '--all',
description:
'Push all branches (i.e. refs under refs/heads/); cannot be used with other <refspec>'),
Option(
name: '--prune',
description:
'Remove remote branches that don\'t have a local counterpart'),
Option(
name: '--mirror',
description:
'Instead of naming each ref to push, specifies that all refs under refs/ be mirrored to the remote repository'),
Option(
name: ['-n', '--dry-run'],
description: 'Do everything except actually send the updates'),
Option(
name: '--porcelain',
description:
'Produce machine-readable output. The output status line for each ref will be tab-separated and sent to stdout instead of stderr'),
Option(
name: ['-d', '--delete'],
description:
'All listed refs are deleted from the remote repository. This is the same as prefixing all refs with a colon'),
Option(
name: '--tags',
description:
'All refs under refs/tags are pushed, in addition to refspecs explicitly listed on the command line'),
Option(
name: '--follow-tags',
description:
'Push all the refs that would be pushed without this option, and also push annotated tags in refs/tags that are missing from the remote but are pointing at commit-ish that are reachable from the refs being pushed. This can also be specified with configuration variable push.followTags'),
Option(
name: '--signed',
description:
'GPG-sign the push request to update refs on the receiving side, to allow it to be checked by the hooks and/or be logged. If false or --no-signed, no signing will be attempted. If true or --signed, the push will fail if the server does not support signed pushes. If set to if-asked, sign if and only if the server supports signed pushes. The push will also fail if the actual call to gpg --sign fails. See git-receive-pack(1) for the details on the receiving end',
args: [
Arg(isOptional: true, suggestions: [
FigSuggestion(name: 'true'),
FigSuggestion(name: 'false'),
FigSuggestion(name: 'if-asked')
])
]),
Option(
name: '--no-signed',
description:
'GPG-sign the push request to update refs on the receiving side, to allow it to be checked by the hooks and/or be logged. If false or --no-signed, no signing will be attempted. If true or --signed, the push will fail if the server does not support signed pushes. If set to if-asked, sign if and only if the server supports signed pushes. The push will also fail if the actual call to gpg --sign fails. See git-receive-pack(1) for the details on the receiving end'),
Option(
name: '--atomic',
description:
'Use an atomic transaction on the remote side if available. Either all refs are updated, or on error, no refs are updated. If the server does not support atomic pushes the push will fail'),
Option(
name: '--no-atomic',
description:
'Use an atomic transaction on the remote side if available. Either all refs are updated, or on error, no refs are updated. If the server does not support atomic pushes the push will fail'),
Option(
name: ['-f', '--force'],
description:
'Usually, the command refuses to update a remote ref that is not an ancestor of the local ref used to overwrite it. Also, when --force-with-lease option is used, the command refuses to update a remote ref whose current value does not match what is expected. This flag disables these checks, and can cause the remote repository to lose commits; use it with care'),
Option(
name: '--repo',
description:
'This option is equivalent to the <repository> argument. If both are specified, the command-line argument takes precedence',
args: [Arg(name: 'repository')]),
Option(
name: ['-u', '--set-upstream'],
description:
'For every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less git-pull(1) and other commands'),
Option(
name: '--thin',
description:
'These options are passed to git-send-pack(1). A thin transfer significantly reduces the amount of sent data when the sender and receiver share many of the same objects in common. The default is --thin'),
Option(
name: '--no-thin',
description:
'These options are passed to git-send-pack(1). A thin transfer significantly reduces the amount of sent data when the sender and receiver share many of the same objects in common. The default is --thin'),
Option(
name: ['-q', '--quiet'],
description:
'Suppress all output, including the listing of updated refs, unless an error occurs. Progress is not reported to the standard error stream'),
Option(name: ['-v', '--verbose'], description: 'Run verbosely'),
Option(
name: '--progress',
description:
'Progress status is reported on the standard error stream by default when it is attached to a terminal, unless -q is specified. This flag forces progress status even if the standard error stream is not directed to a terminal'),
Option(
name: '--no-recurse-submodules',
description:
'May be used to make sure all submodule commits used by the revisions to be pushed are available on a remote-tracking branch. If check is used Git will verify that all submodule commits that changed in the revisions to be pushed are available on at least one remote of the submodule. If any commits are missing the push will be aborted and exit with non-zero status. If on-demand is used all submodules that changed in the revisions to be pushed will be pushed. If on-demand was not able to push all necessary revisions it will also be aborted and exit with non-zero status. If only is used all submodules will be recursively pushed while the superproject is left unpushed. A value of no or using --no-recurse-submodules can be used to override the push.recurseSubmodules configuration variable when no submodule recursion is required'),
Option(
name: '--recurse-submodules',
description:
'May be used to make sure all submodule commits used by the revisions to be pushed are available on a remote-tracking branch. If check is used Git will verify that all submodule commits that changed in the revisions to be pushed are available on at least one remote of the submodule. If any commits are missing the push will be aborted and exit with non-zero status. If on-demand is used all submodules that changed in the revisions to be pushed will be pushed. If on-demand was not able to push all necessary revisions it will also be aborted and exit with non-zero status. If only is used all submodules will be recursively pushed while the superproject is left unpushed. A value of no or using --no-recurse-submodules can be used to override the push.recurseSubmodules configuration variable when no submodule recursion is required',
args: [
Arg(suggestions: [
FigSuggestion(name: 'check'),
FigSuggestion(name: 'on-demand'),
FigSuggestion(name: 'only'),
FigSuggestion(name: 'no')
])
]),
Option(
name: '--verify',
description:
'Turn on the pre-push hook. The default is --verify, giving the hook a chance to prevent the push. With'),
Option(
name: '--no-verify',
description:
'Turn off the pre-push hook. The default is --verify, giving the hook a chance to prevent the push. With'),
Option(
name: ['-4', '--ipv4'],
description: 'Use IPv4 addresses only, ignoring IPv6 addresses'),
Option(
name: ['-6', '--ipv6'],
description: 'Use IPv6 addresses only, ignoring IPv4 addresses'),
Option(
name: ['-o', '--push-option'],
description:
'Transmit the given string to the server, which passes them to the pre-receive as well as the post-receive hook. The given string must not contain a NUL or LF character. When multiple --push-option=<option> are given, they are all sent to the other side in the order listed on the command line. When no --push-option=<option> is given from the command line, the values of configuration variable push.pushOption are used instead',
args: [Arg(name: 'option')]),
Option(
name: ['--receive-pack', '--exec'],
description:
'Path to the git-receive-pack program on the remote end. Sometimes useful when pushing to a remote repository over ssh, and you do not have the program in a directory on the default \$PATH',
args: [Arg(name: 'git-receive-pack')]),
Option(
name: '--no-force-with-lease',
description:
'Cancel all the previous --force-with-lease on the command line'),
Option(
name: '--force-with-lease',
description:
'Protect the named ref (alone), if it is going to be updated, by requiring its current value to be the same as the specified value <expect> (which is allowed to be different from the remote-tracking branch we have for the refname, or we do not even have to have such a remote-tracking branch when this form is used). If <expect> is the empty string, then the named ref must not already exist',
args: [Arg(name: 'refname[:expect]', isOptional: true)])
], args: [
Arg(
name: 'remote',
isOptional: true,
generators: gitGenerators['remotes'],
filterStrategy: 'fuzzy'),
Arg(
name: 'branch',
isOptional: true,
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy')
]),
Subcommand(
name: 'pull',
description: 'Integrate with another repository',
options: [
Option(
name: ['--rebase', '-r'],
isDangerous: true,
description:
'Fetch the remote’s copy of current branch and rebases it into the local copy',
args: [
Arg(
isOptional: true,
name: 'remote',
generators: gitGenerators['remotes'],
filterStrategy: 'fuzzy',
suggestions: [
FigSuggestion(name: 'false'),
FigSuggestion(name: 'true'),
FigSuggestion(name: 'merges'),
FigSuggestion(name: 'preserve'),
FigSuggestion(name: 'interactive')
])
]),
Option(
name: '--no-rebase', description: 'Override earlier --rebase'),
Option(
name: '--commit',
description:
'Perform the merge and commit the result. This option can be used to override --no-commit'),
Option(
name: '--no-commit',
description:
'Perform the merge and stop just before creating a merge commit, to give the user a chance to inspect and further tweak the merge result before committing'),
Option(
name: ['--edit', '-e'],
description:
'Invoke an editor before committing successful mechanical merge to further edit the auto-generated merge message, so that the user can explain and justify the merge'),
Option(
name: '--no-edit',
description:
'The --no-edit option can be used to accept the auto-generated message (this is generally discouraged). The --edit (or -e) option is still useful if you are giving a draft message with the -m option from the command line and want to edit it in the editor'),
Option(
name: '--cleanup',
description:
'This option determines how the merge message will be cleaned up before committing. See git-commit[1] for more details. In addition, if the <mode> is given a value of scissors, scissors will be appended to MERGE_MSG before being passed on to the commit machinery in the case of a merge conflict',
args: [
Arg(name: 'mode', suggestions: [
FigSuggestion(name: 'strip'),
FigSuggestion(name: 'whitespace'),
FigSuggestion(name: 'verbatim'),
FigSuggestion(name: 'scissors'),
FigSuggestion(name: 'default')
])
]),
Option(
name: '--ff',
description:
'When possible resolve the merge as a fast-forward (only update the branch pointer to match the merged branch; do not create a merge commit). When not possible (when the merged-in history is not a descendant of the current history), create a merge commit'),
Option(
name: '--no-ff',
description:
'Create a merge commit in all cases, even when the merge could instead be resolved as a fast-forward'),
Option(
name: '--ff-only',
description:
'Resolve the merge as a fast-forward when possible. When not possible, refuse to merge and exit with a non-zero status'),
Option(
name: ['-S', '--gpg-sign'],
description:
'GPG-sign the resulting merge commit. The keyid argument is optional and defaults to the committer identity; if specified, it must be stuck to the option without a space',
args: [Arg(name: 'keyid', isOptional: true)]),
Option(
name: '--no-gpg-sign',
description:
'Is useful to countermand both commit.gpgSign configuration variable, and earlier --gpg-sign'),
Option(
name: '--log',
description:
'In addition to branch names, populate the log message with one-line descriptions from at most <n> actual commits that are being merged. See also git-fmt-merge-msg[1]',
args: [Arg(name: 'n', isOptional: true)]),
Option(
name: '--no-log',
description:
'Do not list one-line descriptions from the actual commits being merged'),
Option(
name: '--signoff',
description:
'Add a Signed-off-by trailer by the committer at the end of the commit log message. The meaning of a signoff depends on the project to which you’re committing. For example, it may certify that the committer has the rights to submit the work under the project’s license or agrees to some contributor representation, such as a Developer Certificate of Origin. (See http://developercertificate.org for the one used by the Linux kernel and Git projects.) Consult the documentation or leadership of the project to which you’re contributing to understand how the signoffs are used in that project'),
Option(
name: '--no-signoff',
description:
'Can be used to countermand an earlier --signoff option on the command line'),
Option(
name: '--stat',
description:
'Show a diffstat at the end of the merge. The diffstat is also controlled by the configuration option merge.stat'),
Option(
name: ['-n', '--no-stat'],
description: 'Do not show a diffstat at the end of the merge'),
Option(
name: '--squash',
description:
'With --squash, --commit is not allowed, and will fail. Produce the working tree and index state as if a real merge happened (except for the merge information), but do not actually make a commit, move the HEAD, or record \$GIT_DIR/MERGE_HEAD (to cause the next git commit command to create a merge commit). This allows you to create a single commit on top of the current branch whose effect is the same as merging another branch (or more in case of an octopus)'),
Option(
name: '--no-squash',
description:
'Perform the merge and commit the result. This option can be used to override --squash'),
Option(
name: '--no-verify',
description:
'This option bypasses the pre-merge and commit-msg hooks. See also githooks[5]'),
Option(
name: ['-s', '--strategy'],
description:
'Use the given merge strategy; can be supplied more than once to specify them in the order they should be tried. If there is no -s option, a built-in list of strategies is used instead (git merge-recursive when merging a single head, git merge-octopus otherwise)',
args: [
Arg(name: 'strategy', isVariadic: true, suggestions: [
FigSuggestion(name: 'resolve'),
FigSuggestion(name: 'recursive'),
FigSuggestion(name: 'octopus'),
FigSuggestion(name: 'ours'),
FigSuggestion(name: 'subtree')
])
]),
Option(
name: ['-X', '--strategy-option'],
description:
'Pass merge strategy specific option through to the merge strategy',
args: [
Arg(name: 'option', suggestions: [
FigSuggestion(name: 'ours'),
FigSuggestion(name: 'theirs'),
FigSuggestion(name: 'patience'),
FigSuggestion(name: 'diff-algorithm'),
FigSuggestion(name: 'diff-algorithm=patience'),
FigSuggestion(name: 'diff-algorithm=minimal'),
FigSuggestion(name: 'diff-algorithm=histogram'),
FigSuggestion(name: 'diff-algorithm=myers'),
FigSuggestion(name: 'ignore-space-change'),
FigSuggestion(name: 'ignore-all-space'),
FigSuggestion(name: 'ignore-space-at-eol'),
FigSuggestion(name: 'ignore-cr-at-eol'),
FigSuggestion(name: 'renormalize'),
FigSuggestion(name: 'no-renormalize'),
FigSuggestion(name: 'no-renames'),
FigSuggestion(name: 'find-renames'),
FigSuggestion(name: 'subtree')
])
]),
Option(
name: '--verify-signatures',
description:
'Verify that the tip commit of the side branch being merged is signed with a valid key, i.e. a key that has a valid uid: in the default trust model, this means the signing key has been signed by a trusted key. If the tip commit of the side branch is not signed with a valid key, the merge is aborted'),
Option(
name: '--no-verify-signatures',
description:
'Do not verify that the tip commit of the side branch being merged is signed with a valid key'),
Option(
name: '--summary',
description:
'Synonym to --stat ; this is deprecated and will be removed in the future'),
Option(
name: '--no-summary',
description:
'Synonym to --no-stat ; this is deprecated and will be removed in the future'),
Option(
name: ['-q', '--quiet'],
description: 'Operate quietly. Implies --no-progress'),
Option(name: ['-v', '--verbose'], description: 'Be verbose'),
Option(
name: '--autostash',
description:
'Automatically create a temporary stash entry before the operation begins, and apply it after the operation ends. This means that you can run the operation on a dirty worktree. However, use with care: the final stash application after a successful merge might result in non-trivial conflicts'),
Option(
name: '--no-autostash',
description:
'Do not automatically create a temporary stash entry before the operation begins, and apply it after the operation ends'),
Option(
name: '--allow-unrelated-histories',
description:
'By default, git merge command refuses to merge histories that do not share a common ancestor. This option can be used to override this safety when merging histories of two projects that started their lives independently. As that is a very rare occasion, no configuration variable to enable this by default exists and will not be added'),
Option(name: '--all', description: 'Fetch all remotes'),
Option(
name: ['-a', '--append'],
description:
'Append ref names and object names of fetched refs to the existing contents of .git/FETCH_HEAD'),
Option(
name: '--atomic',
description:
'Use an atomic transaction to update local refs. Either all refs are updated, or on error, no refs are updated'),
Option(
name: '--depth',
args: [Arg(name: 'depth')],
description:
'Limit fetching to the specified number of commits from the tip of each remote branch history'),
Option(
name: '--deepen',
args: [Arg(name: 'depth')],
description:
'Similar to --depth, except it specifies the number of commits from the current shallow boundary instead of from the tip of each remote branch history'),
Option(
name: '--shallow-since',
args: [Arg(name: 'date')],
description:
'Deepen or shorten the history of a shallow repository to include all reachable commits after <date>'),
Option(
name: '--shallow-exclude',
args: [Arg(name: 'revision')],
description:
'Deepen or shorten the history of a shallow repository to exclude commits reachable from a specified remote branch or tag. This option can be specified multiple times'),
Option(
name: '--unshallow',
description:
'If the source repository is shallow, fetch as much as possible so that the current repository has the same history as the source repository'),
Option(
name: '--update-shallow',
description:
'By default when fetching from a shallow repository, git fetch refuses refs that require updating .git/shallow'),
Option(
name: '--negotiation-tip',
args: [
Arg(name: 'commit|glob', generators: gitGenerators['commits'])
],
description:
'By default, Git will report, to the server, commits reachable from all local refs to find common commits in an attempt to reduce the size of the to-be-received packfile'),
Option(
name: '--dry-run',
description:
'Show what would be done, without making any changes'),
Option(
name: ['-f', '--force'],
description: 'This option overrides that check'),
Option(name: ['-k', '--keep'], description: 'Keep downloaded pack'),
Option(
name: ['-p', '--prune'],
description:
'Before fetching, remove any remote-tracking references that no longer exist on the remote'),
Option(
name: ['-P', '--prune-tags'],
description:
'Before fetching, remove any local tags that no longer exist on the remote if --prune is enabled'),
Option(
name: '--no-tags',
description:
'By default, tags that point at objects that are downloaded from the remote repository are fetched and stored locally. This option disables this automatic tag following'),
Option(
name: '--refmap',
args: [Arg(name: 'refspec')],
description:
'When fetching refs listed on the command line, use the specified refspec (can be given more than once) to map the refs to remote-tracking branches, instead of the values of remote.*.fetch configuration variables for the remote repository'),
Option(
name: ['-t', '--tags'],
description:
'By default, tags that point at objects that are downloaded from the remote repository are fetched and stored locally. This option disables this automatic tag following'),
Option(
name: '--recurse-submodules',
args: [
Arg(name: 'mode', isOptional: true, suggestions: [
FigSuggestion(name: 'yes'),
FigSuggestion(name: 'on-demand'),
FigSuggestion(name: 'no')
])
],
description:
'When fetching refs listed on the command line, use the specified refspec (can be given more than once) to map the refs to remote-tracking branches, instead of the values of remote.*.fetch configuration variables for the remote repository'),
Option(
name: '--no-recurse-submodules',
description:
'Disable recursive fetching of submodules (this has the same effect as using the --recurse-submodules=no option)'),
Option(
name: ['-j', '--jobs'],
args: [Arg(name: 'n')],
description:
'Number of parallel children to be used for all forms of fetching'),
Option(
name: '--set-upstream',
description:
'If the remote is fetched successfully, add upstream (tracking) reference, used by argument-less git-pull[1] and other commands'),
Option(
name: '--upload-pack',
args: [Arg(name: 'upload-pack')],
description:
'When given, and the repository to fetch from is handled by git fetch-pack, --exec=<upload-pack> is passed to the command to specify non-default path for the command run on the other end'),
Option(
name: '--progress',
description:
'Progress status is reported on the standard error stream by default when it is attached to a terminal, unless -q is specified'),
Option(
name: ['-o', '--server-option'],
args: [Arg(name: 'option')],
description:
'Transmit the given string to the server when communicating using protocol version 2. The given string must not contain a NUL or LF character'),
Option(
name: '--show-forced-updates',
description:
'By default, git checks if a branch is force-updated during fetch. This can be disabled through fetch.showForcedUpdates, but the --show-forced-updates option guarantees this check occurs'),
Option(
name: '--no-show-forced-updates',
description:
'By default, git checks if a branch is force-updated during fetch. Pass --no-show-forced-updates or set fetch.showForcedUpdates to false to skip this check for performance reasons'),
Option(name: [
'-4',
'--ipv4'
], description: 'Use IPv4 addresses only, ignoring IPv6 addresses'),
Option(
name: ['-6', '--ipv6'],
description: 'Use IPv6 addresses only, ignoring IPv4 addresses')
],
args: [
Arg(
name: 'remote',
isOptional: true,
generators: gitGenerators['remotes'],
filterStrategy: 'fuzzy'),
Arg(
name: 'branch',
isOptional: true,
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy')
]),
Subcommand(
name: 'diff',
description:
'Show changes between commits, commit and working tree, etc',
options: [
Option(
name: '--staged',
description:
'Show difference between the files in the staging area and the latest version'),
Option(
name: '--cached',
description:
'Show difference between staged changes and last commit'),
Option(name: '--help', description: 'Shows different options'),
Option(
name: '--numstat',
description:
'Shows number of added and deleted lines in decimal notation'),
Option(
name: '--name-only',
description: 'Show only names of changed files'),
Option(
name: '--shortstat',
description:
'Output only the last line of the --stat format containing total number of modified files'),
Option(name: '--stat', description: 'Generate a diffstat', args: [
Arg(
isOptional: true,
name: '[=< width >[,< name-width >[,< count >]]]')
]),
Option(
name: '--',
description:
'Separates paths from options for disambiguation purposes',
args: [
Arg(
isVariadic: true,
template: 'filepaths',
name: '[< path >...]')
])
],
args: [
Arg(
name: 'commit or file',
isOptional: true,
isVariadic: true,
suggestions: headSuggestions,
generators: [
gitGenerators['commits'],
gitGenerators['remoteLocalBranches'],
gitGenerators['getChangedTrackedFiles']
])
]),
Subcommand(
name: 'reset',
description: 'Reset current HEAD to the specified state',
options: [
Option(
name: '--keep',
description:
'Safe: files which are different between the current HEAD and the given commit. Will abort if there are uncommitted changes'),
Option(
name: '--soft',
description:
'Remove the last commit from the current branch, but the file changes will stay in your working tree'),
Option(
name: '--hard',
description:
'⚠️WARNING: you will lose all uncommitted changes in addition to the changes introduced in the last commit'),
Option(
name: '--mixed',
description:
'Keep the changes in your working tree but not on the index'),
Option(
name: '-N',
description: 'Mark removed paths as intent-to-add',
dependsOn: ['--mixed']),
Option(
name: '--merge',
description:
'Resets the index and updates the files in the working tree that are different" +\n " between \'commit\' and HEAD'),
Option(
name: ['-q', '--quiet'],
description: 'Be quiet, only report errors',
exclusiveOn: ['--no-quiet']),
Option(
name: '--no-quiet',
description: 'Inverse of --quiet',
exclusiveOn: ['-q', '--quiet']),
Option(
name: '--pathspec-from-file',
description:
'Pathspec is passed in file <file> instead of commandline args',
args: [
Arg(
name: 'file',
template: ['folders', 'filepaths'],
suggestions: [FigSuggestion(name: '-')])
]),
Option(
name: '--pathspec-file-nul',
description:
'Pathspec elements are separated with NUL character',
dependsOn: ['--pathspec-from-file']),
Option(
name: ['-p', '--patch'],
description:
'Interactively select hunks in the difference between the index and <tree-ish>')
],
args: [
Arg(
isOptional: true,
isVariadic: true,
suggestions: headSuggestions,
generators: [
gitGenerators['treeish'],
gitGenerators['commits'],
gitGenerators['remoteLocalBranches']
])
]),
Subcommand(name: 'log', description: 'Show commit logs', options: [
Option(
name: '--follow',
description: 'Show history of given file',
args: [Arg(name: 'file', template: 'filepaths')]),
Option(name: ['-q', '--quiet'], description: 'Suppress diff output'),
Option(
name: '--show-signature',
description: 'Check the validity of a signed commit'),
Option(name: '--source', description: 'Show source'),
Option(
name: '--oneline',
description: 'Show each commit as a single line'),
Option(
name: ['-p', '-u', '--patch'],
description: 'Display the full diff of each commit'),
Option(
name: '--stat',
description:
'Include which files were altered and the relative number of lines that were added or deleted from each of them'),
Option(
name: '--grep',
description:
'Search for commits with a commit message that matches <pattern>',
args: [Arg(name: 'pattern')]),
Option(
name: '--author',
description: 'Search for commits by a particular author',
args: [Arg(name: 'pattern')])
], args: [
Arg(
name: 'since',
isOptional: true,
description: 'Commit ID, branch name, HEAD, or revision reference',
generators: gitGenerators['commits'],
suggestions: headSuggestions),
Arg(
name: 'until',
isOptional: true,
description: 'Commit ID, branch name, HEAD, or revision reference',
generators: gitGenerators['commits'],
suggestions: headSuggestions)
]),
Subcommand(
name: 'remote',
description: 'Manage remote repository',
subcommands: [
Subcommand(
name: 'add',
description:
'Add a remote named <name> for the repository at <url>',
args: [
Arg(name: 'name'),
Arg(name: 'repository url')
],
options: [
Option(
name: '-t',
description:
'A refspec to track only <branch> is created',
args: [Arg(name: 'branch')]),
Option(
name: '-m',
description:
'A symbolic-ref refs/remotes/<name>/HEAD is set up to point at remote’s <master> branch',
args: [Arg(name: 'master')]),
Option(
name: '-f',
description:
'Git fetch <name> is run immediately after the remote information is set up'),
Option(
name: '--tags',
description:
'Git fetch <name> imports every tag from the remote repository'),
Option(
name: '--no-tags',
description:
'Git fetch <name> does not import tags from the remote repository'),
Option(
name: '--mirror',
description: 'Create fetch or push mirror',
args: [
Arg(suggestions: [
FigSuggestion(name: 'fetch'),
FigSuggestion(name: 'push')
])
])
]),
Subcommand(
name: 'set-head',
description: 'Sets or deletes the default branch',
args: [
Arg(
name: 'name',
generators: gitGenerators['remotes'],
filterStrategy: 'fuzzy'),
Arg(name: 'branch', isOptional: true)
],
options: [
Option(
name: ['--auto', '-a'],
description:
'The remote is queried to determine its HEAD, then the symbolic-ref refs/remotes/<name>/HEAD is set to the same branch'),
Option(
name: ['--delete', '-d'],
description:
'The symbolic ref refs/remotes/<name>/HEAD is deleted')
]),
Subcommand(
name: 'set-branches',
description:
'Changes the list of branches tracked by the named remote. This can be used to track a subset of the available remote branches after the initial setup for a remote',
options: [
Option(
name: '--add',
description:
'Instead of replacing the list of currently tracked branches, adds to that list')
],
args: [
Arg(
name: 'name',
generators: gitGenerators['remotes'],
filterStrategy: 'fuzzy'),
Arg(name: 'branch', isVariadic: true)
]),
Subcommand(
name: ['rm', 'remove'],
description: 'Removes given remote [name]',
args: [
Arg(
name: 'remote',
generators: gitGenerators['remotes'],
filterStrategy: 'fuzzy')
]),
Subcommand(
name: 'rename',
description: 'Removes given remote [name]',
args: [
Arg(
name: 'old remote',
generators: gitGenerators['remotes'],
filterStrategy: 'fuzzy'),
Arg(name: 'new remote name')
]),
Subcommand(
name: 'get-url',
description: 'Retrieves the URLs for a remote',
options: [
Option(
name: '--push',
description:
'Push URLs are queried rather than fetch URLs'),
Option(
name: '--all',
description: 'All URLs for the remote will be listed')
],
args: [
Arg(
name: 'name',
generators: gitGenerators['remotes'],
filterStrategy: 'fuzzy')
]),
Subcommand(
name: 'set-url',
description: 'Changes the URLs for the remote',
args: [
Arg(
name: 'name',
generators: gitGenerators['remotes'],
filterStrategy: 'fuzzy'),
Arg(name: 'newurl'),
Arg(name: 'oldurl', isOptional: true)
],
options: [
Option(
name: '--push',
description:
'Push URLs are manipulated instead of fetch URLs'),
Option(
name: '--add',
description:
'Instead of changing existing URLs, new URL is added'),
Option(
name: '--delete',
description:
'Instead of changing existing URLs, all URLs matching regex <url> are deleted for remote <name>')
]),
Subcommand(
name: 'show',
description: 'Gives some information about the remote [name]',
args: [
Arg(
name: 'name',
isVariadic: true,
generators: gitGenerators['remotes'],
filterStrategy: 'fuzzy')
],
options: [
Option(
name: '-n',
description:
'The remote heads are not queried first with git ls-remote <name>; cached information is used instead')
]),
Subcommand(
name: 'prune',
description:
'Equivalent to git fetch --prune [name], except that no new references will be fetched',
args: [
Arg(
name: 'name',
isVariadic: true,
generators: gitGenerators['remotes'],
filterStrategy: 'fuzzy')
],
options: [
Option(name: '-n'),
Option(
name: '--dry-run',
description:
'Report what branches would be pruned, but do not actually prune them')
]),
Subcommand(
name: 'update',
description:
'Fetch updates for remotes or remote groups in the repository as defined by remotes.<group>',
options: [
Option(name: ['-p', '--prune'], description: '')
],
args: [
Arg(name: 'group', isOptional: true, isVariadic: true),
Arg(name: 'remote', isOptional: true, isVariadic: true)
])
],
options: [
Option(
name: ['-v', '--verbose'],
description:
'Be a little more verbose and show remote url after name. NOTE: This must be placed between remote and subcommand')
]),
Subcommand(
name: 'fetch',
description: 'Download objects and refs from another repository',
args: [
Arg(
name: 'remote',
isOptional: true,
generators: gitGenerators['remotes'],
filterStrategy: 'fuzzy'),
Arg(
name: 'branch',
isOptional: true,
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy'),
Arg(name: 'refspec', isOptional: true)
],
options: [
Option(name: '--all', description: 'Fetch all remotes'),
Option(
name: ['-a', '--append'],
description:
'Append ref names and object names of fetched refs to the existing contents of .git/FETCH_HEAD'),
Option(
name: '--atomic',
description:
'Use an atomic transaction to update local refs. Either all refs are updated, or on error, no refs are updated'),
Option(
name: '--depth',
args: [Arg(name: 'depth')],
description:
'Limit fetching to the specified number of commits from the tip of each remote branch history'),
Option(
name: '--deepen',
args: [Arg(name: 'depth')],
description:
'Similar to --depth, except it specifies the number of commits from the current shallow boundary instead of from the tip of each remote branch history'),
Option(
name: '--shallow-since',
args: [Arg(name: 'date')],
description:
'Deepen or shorten the history of a shallow repository to include all reachable commits after <date>'),
Option(
name: '--shallow-exclude',
args: [Arg(name: 'revision')],
description:
'Deepen or shorten the history of a shallow repository to exclude commits reachable from a specified remote branch or tag. This option can be specified multiple times'),
Option(
name: '--unshallow',
description:
'If the source repository is shallow, fetch as much as possible so that the current repository has the same history as the source repository'),
Option(
name: '--update-shallow',
description:
'By default when fetching from a shallow repository, git fetch refuses refs that require updating .git/shallow'),
Option(
name: '--negotiation-tip',
args: [
Arg(name: 'commit|glob', generators: gitGenerators['commits'])
],
description:
'By default, Git will report, to the server, commits reachable from all local refs to find common commits in an attempt to reduce the size of the to-be-received packfile'),
Option(
name: '--dry-run',
description:
'Show what would be done, without making any changes'),
Option(
name: '--write-fetch-head',
description:
'Write the list of remote refs fetched in the FETCH_HEAD file directly under \$GIT_DIR. This is the default'),
Option(
name: '--no-write-fetch-head',
description: 'Tells Git not to write the file'),
Option(
name: ['-f', '--force'],
description: 'This option overrides that check'),
Option(name: ['-k', '--keep'], description: 'Keep downloaded pack'),
Option(
name: '--multiple',
description:
'Allow several <repository> and <group> arguments to be specified. No <refspec>s may be specified'),
Option(
name: ['--auto-maintenance', '--auto-gc'],
description:
'Run git maintenance run --auto at the end to perform automatic repository maintenance if'),
Option(
name: ['--no-auto-maintenance', '--no-auto-gc'],
description:
'Don\'t run git maintenance run --auto at the end to perform automatic repository maintenance'),
Option(
name: '--write-commit-graph',
description:
'Write a commit-graph after fetching. This overrides the config setting fetch.writeCommitGraph'),
Option(
name: '--no-write-commit-graph',
description:
'Don\'t write a commit-graph after fetching. This overrides the config setting fetch.writeCommitGraph'),
Option(
name: ['-p', '--prune'],
description:
'Before fetching, remove any remote-tracking references that no longer exist on the remote'),
Option(
name: ['-P', '--prune-tags'],
description:
'Before fetching, remove any local tags that no longer exist on the remote if --prune is enabled'),
Option(
name: ['-n', '--no-tags'],
description:
'By default, tags that point at objects that are downloaded from the remote repository are fetched and stored locally. This option disables this automatic tag following'),
Option(
name: '--refmap',
args: [Arg(name: 'refspec')],
description:
'When fetching refs listed on the command line, use the specified refspec (can be given more than once) to map the refs to remote-tracking branches, instead of the values of remote.*.fetch configuration variables for the remote repository'),
Option(
name: ['-t', '--tags'],
description:
'By default, tags that point at objects that are downloaded from the remote repository are fetched and stored locally. This option disables this automatic tag following'),
Option(
name: '--recurse-submodules',
args: [
Arg(name: 'mode', isOptional: true, suggestions: [
FigSuggestion(name: 'yes'),
FigSuggestion(name: 'on-demand'),
FigSuggestion(name: 'no')
])
],
description:
'When fetching refs listed on the command line, use the specified refspec (can be given more than once) to map the refs to remote-tracking branches, instead of the values of remote.*.fetch configuration variables for the remote repository'),
Option(
name: ['-j', '--jobs'],
args: [Arg(name: 'n')],
description:
'Number of parallel children to be used for all forms of fetching'),
Option(
name: '--no-recurse-submodules',
description:
'Disable recursive fetching of submodules (this has the same effect as using the --recurse-submodules=no option)'),
Option(
name: '--set-upstream',
description:
'If the remote is fetched successfully, add upstream (tracking) reference, used by argument-less git-pull[1] and other commands'),
Option(
name: '--submodule-prefix',
args: [Arg(name: 'path')],
description:
'Prepend <path> to paths printed in informative messages such as ”Fetching submodule foo". This option is used internally when recursing over submodules'),
Option(
name: '--recurse-submodules-default',
args: [
Arg(name: 'mode', isOptional: true, suggestions: [
FigSuggestion(name: 'yes'),
FigSuggestion(name: 'on-demand')
])
],
description:
'This option is used internally to temporarily provide a non-negative default value for the --recurse-submodules option'),
Option(
name: ['-u', '--update-head-ok'],
description:
'By default git fetch refuses to update the head which corresponds to the current branch. This flag disables the check. This is purely for the internal use for git pull to communicate with git fetch, and unless you are implementing your own Porcelain you are not supposed to use it'),
Option(
name: '--upload-pack',
args: [Arg(name: 'upload-pack')],
description:
'When given, and the repository to fetch from is handled by git fetch-pack, --exec=<upload-pack> is passed to the command to specify non-default path for the command run on the other end'),
Option(
name: ['-q', '--quiet'],
description:
'Pass --quiet to git-fetch-pack and silence any other internally used git commands. Progress is not reported to the standard error stream'),
Option(name: ['-v', '--verbose'], description: 'Be verbose'),
Option(
name: '--progress',
description:
'Progress status is reported on the standard error stream by default when it is attached to a terminal, unless -q is specified'),
Option(
name: ['-o', '--server-option'],
args: [Arg(name: 'option')],
description:
'Transmit the given string to the server when communicating using protocol version 2. The given string must not contain a NUL or LF character'),
Option(
name: '--show-forced-updates',
description:
'By default, git checks if a branch is force-updated during fetch. This can be disabled through fetch.showForcedUpdates, but the --show-forced-updates option guarantees this check occurs'),
Option(
name: '--no-show-forced-updates',
description:
'By default, git checks if a branch is force-updated during fetch. Pass --no-show-forced-updates or set fetch.showForcedUpdates to false to skip this check for performance reasons'),
Option(name: [
'-4',
'--ipv4'
], description: 'Use IPv4 addresses only, ignoring IPv6 addresses'),
Option(name: [
'-6',
'--ipv6'
], description: 'Use IPv6 addresses only, ignoring IPv4 addresses'),
Option(
name: '--stdin',
description:
'Read refspecs, one per line, from stdin in addition to those provided as arguments. The "tag <name>" format is not supported')
]),
Subcommand(
name: 'stash',
description: 'Temporarily stores all the modified tracked files',
requiresSubcommand: false,
subcommands: [
Subcommand(
name: 'push',
description:
'Save your local modifications to a new stash entry and roll them back to HEAD',
options: [
Option(
name: ['-p', '--patch'],
description:
'Interactively select hunks from the diff between HEAD and the working tree to be stashed'),
Option(
name: ['-k', '--keep-index'],
description:
'All changed already added to the index are left intact'),
Option(
name: ['-u', '--include-untracked'],
description:
'All untracked files are also stashed and then cleaned up'),
Option(
name: ['-a', '--all'],
description:
'All ignored and untracked files are also stashed'),
Option(
name: ['-q', '--quiet'],
description: 'Quiet, suppress feedback messages'),
Option(
name: ['-m', '--message'],
insertValue: '-m {cursor}',
description: 'Use the given <msg> as the stash message',
args: [Arg(name: 'message')]),
Option(name: '--pathspec-from-file', description: ''),
Option(
name: '--',
description:
'Separates pathsec from options for disambiguation purposes')
]),
Subcommand(
name: 'show',
description:
'Show the changes recorded in the stash entry as a diff',
args: [
Arg(
name: 'stash',
isOptional: true,
generators: gitGenerators['stashes'],
filterStrategy: 'fuzzy')
]),
Subcommand(
name: 'save',
description:
'Temporarily stores all the modified tracked files',
options: [
Option(
name: ['-p', '--patch'],
description:
'Interactively select hunks from the diff between HEAD and the working tree to be stashed'),
Option(
name: ['-k', '--keep-index'],
description:
'All changed already added to the index are left intact'),
Option(
name: ['-u', '--include-untracked'],
description:
'All untracked files are also stashed and then cleaned up'),
Option(
name: ['-a', '--all'],
description:
'All ignored and untracked files are also stashed'),
Option(
name: ['-q', '--quiet'],
description: 'Quiet, suppress feedback messages')
],
args: [
Arg(name: 'message', isOptional: true)
]),
Subcommand(
name: 'pop',
description: 'Restores the most recently stashed files',
options: [
Option(
name: '--index',
description:
'Tries to reinstate not only the working tree\'s changes, but also the index\'s ones'),
Option(
name: ['-q', '--quiet'],
description: 'Quiet, suppress feedback messages')
],
args: [
Arg(
name: 'stash',
isOptional: true,
generators: gitGenerators['stashes'],
filterStrategy: 'fuzzy')
]),
Subcommand(
name: 'list', description: 'Lists all stashed changesets'),
Subcommand(
name: 'drop',
description: 'Discards the most recently stashed changeset',
options: [
Option(
name: ['-q', '--quiet'],
description: 'Quiet, suppress feedback messages')
],
args: [
Arg(
name: 'stash',
isOptional: true,
generators: gitGenerators['stashes'],
filterStrategy: 'fuzzy')
]),
Subcommand(
name: 'clear', description: 'Remove all the stash entries'),
Subcommand(
name: 'apply',
description:
'Like pop, but do not remove the state from the stash list',
options: [
Option(
name: '--index',
description:
'Tries to reinstate not only the working tree\'s changes, but also the index\'s ones'),
Option(
name: ['-q', '--quiet'],
description: 'Quiet, suppress feedback messages')
],
args: [
Arg(
name: 'stash',
isOptional: true,
generators: gitGenerators['stashes'],
filterStrategy: 'fuzzy')
]),
Subcommand(
name: 'branch',
description: 'Creates and checks out a new branch named',
args: [
Arg(
name: 'branch',
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy'),
Arg(
name: 'stash',
isOptional: true,
generators: gitGenerators['stashes'],
filterStrategy: 'fuzzy')
]),
Subcommand(
name: 'create',
description: 'Creates a stash entry',
args: [Arg(name: 'message', isOptional: true)]),
Subcommand(
name: 'store',
description:
'Store a given stash in the stash ref, updating the stash reflog',
options: [
Option(
name: ['-m', '--message'],
insertValue: '-m {cursor}',
description: 'Use the given <msg> as the stash message',
args: [Arg(name: 'message')]),
Option(
name: ['-q', '--quiet'],
description: 'Quiet, suppress feedback messages')
],
args: [
Arg(name: 'message'),
Arg(name: 'commit', generators: gitGenerators['commits'])
])
]),
Subcommand(
name: 'reflog',
description: 'Show history of events with hashes',
options: [
Option(name: '--relative-date', description: 'Show date info'),
Option(name: '--all', description: 'Show all refs')
]),
Subcommand(
name: 'clone',
description: 'Clone a repository into a new directory',
args: [
Arg(name: 'repository', description: 'Git library to be cloned'),
Arg(
name: 'directory',
description: 'Specify the new directory name or target folder',
template: 'folders',
isOptional: true)
],
options: [
Option(
name: ['-l', '--local'],
description:
'Bypasses the normal git aware transport mechanism'),
Option(
name: '--no-hardlinks',
description:
'Force the cloning process from a repository on a local filesystem to copy the files under the .git/objects directory instead of using hardlinks'),
Option(
name: ['-s', '--shared'],
isDangerous: true,
description:
'Automatically setup .git/objects/info/alternates to share the objects with the source repository'),
Option(
name: '--dry-run',
description: 'Do nothing; only show what would happen'),
Option(
name: '--reference',
description:
'If the reference repository is on the local machine, automatically setup',
args: [Arg(name: 'repository')]),
Option(
name: '--reference-if-able',
description:
'If the reference repository is on the local machine, automatically setup. Non existing directory is skipped with a warning',
args: [Arg(name: 'repository')]),
Option(
name: '--dissociate',
description:
'Borrow the objects from reference repositories specified with the --reference options only to reduce network transfer, and stop borrowing from them after a clone is made by making necessary local copies of borrowed objects'),
Option(
name: ['-q', '--quiet'],
description:
'Operate quietly. Progress is not reported to the standard error stream'),
Option(
name: ['-v', '--verbose'],
description:
'Run verbosely. Does not affect the reporting of progress status to the standard error stream'),
Option(
name: '--progress',
description:
'Progress status is reported on the standard error stream by default when it is attached to a terminal, unless --quiet is specified. This flag forces progress status even if the standard error stream is not directed to a terminal'),
Option(
name: '--server-option',
description:
'Transmit the given string to the server when communicating using protocol version 2. The given string must not contain a NUL or LF character. The server’s handling of server options, including unknown ones, is server-specific. When multiple --server-option=<option> are given, they are all sent to the other side in the order listed on the command line',
args: [Arg(name: 'option')]),
Option(
name: ['-n', '--no-checkout'],
description:
'No checkout of HEAD is performed after the clone is complete'),
Option(
name: '--bare',
description:
'Make a bare Git repository. That is, instead of creating <directory> and placing the administrative files in <directory>/.git, make the <directory> itself the \$GIT_DIR. This obviously implies the --no-checkout because there is nowhere to check out the working tree. Also the branch heads at the remote are copied directly to corresponding local branch heads, without mapping them to refs/remotes/origin/. When this option is used, neither remote-tracking branches nor the related configuration variables are created'),
Option(
name: '--sparse',
description:
'Initialize the sparse-checkout file so the working directory starts with only the files in the root of the repository. The sparse-checkout file can be modified to grow the working directory as needed'),
Option(
name: '--filter',
description:
'Use the partial clone feature and request that the server sends a subset of reachable objects according to a given object filter. When using --filter, the supplied <filter-spec> is used for the partial clone filter. For example, --filter=blob:none will filter out all blobs (file contents) until needed by Git. Also, --filter=blob:limit=<size> will filter out all blobs of size at least <size>. For more details on filter specifications, see the --filter option in git-rev-list[1]',
args: [Arg(name: 'filter spe')]),
Option(
name: '--mirror',
description:
'Set up a mirror of the source repository. This implies --bare. Compared to --bare, --mirror not only maps local branches of the source to local branches of the target, it maps all refs (including remote-tracking branches, notes etc.) and sets up a refspec configuration such that all these refs are overwritten by a git remote update in the target repository'),
Option(
name: ['-o', '--origin'],
description:
'Instead of using the remote name origin to keep track of the upstream repository, use <name>. Overrides clone.defaultRemoteName from the config',
args: [Arg(name: 'nam')]),
Option(
name: ['-b', '--branch'],
description:
'Instead of pointing the newly created HEAD to the branch pointed to by the cloned repository’s HEAD, point to <name> branch instead. In a non-bare repository, this is the branch that will be checked out. --branch can also take tags and detaches the HEAD at that commit in the resulting repository',
args: [Arg(name: 'branch nam')]),
Option(
name: ['-u', '--upload-pack'],
description:
'When given, and the repository to clone from is accessed via ssh, this specifies a non-default path for the command run on the other end',
args: [Arg(name: 'upload pack')]),
Option(
name: '--template',
description:
'Specify the directory from which templates will be used',
args: [Arg(name: 'template directory')]),
Option(
name: ['-c', '--config'],
description:
'Set a configuration variable in the newly-created repository; this takes effect immediately after the repository is initialized, but before the remote history is fetched or any files checked out. The key is in the same format as expected by git-config[1] (e.g., core.eol=true). If multiple values are given for the same key, each value will be written to the config file. This makes it safe, for example, to add additional fetch refspecs to the origin remote. Due to limitations of the current implementation, some configuration variables do not take effect until after the initial fetch and checkout. Configuration variables known to not take effect are: remote.<name>.mirror and remote.<name>.tagOpt. Use the corresponding --mirror and --no-tags options instead',
args: [Arg(name: 'key=valu')]),
Option(
name: '--depth',
description:
'Create a shallow clone with a history truncated to the specified number of commits. Implies --single-branch unless --no-single-branch is given to fetch the histories near the tips of all branches. If you want to clone submodules shallowly, also pass --shallow-submodules',
args: [Arg(name: 'depth')]),
Option(
name: '--shallow-since',
description:
'Create a shallow clone with a history after the specified time',
args: [Arg(name: 'date')]),
Option(
name: '--shallow-exclude',
description:
'Create a shallow clone with a history, excluding commits reachable from a specified remote branch or tag. This option can be specified multiple times',
args: [Arg(name: 'revision')]),
Option(
name: '--single-branch',
description:
'Clone only the history leading to the tip of a single branch, either specified by the --branch option or the primary branch remote’s HEAD points at. Further fetches into the resulting repository will only update the remote-tracking branch for the branch this option was used for the initial cloning. If the HEAD at the remote did not point at any branch when --single-branch clone was made, no remote-tracking branch is created'),
Option(
name: '--no-single-branch',
description:
'Do not clone only the history leading to the tip of a single branch, either specified by the --branch option or the primary branch remote’s HEAD points at. Further fetches into the resulting repository will only update the remote-tracking branch for the branch this option was used for the initial cloning. If the HEAD at the remote did not point at any branch when --single-branch clone was made, no remote-tracking branch is created'),
Option(
name: '--no-tags',
description:
'Don’t clone any tags, and set remote.<remote>.tagOpt=--no-tags in the config, ensuring that future git pull and git fetch operations won’t follow any tags. Subsequent explicit tag fetches will still work, (see git-fetch[1])'),
Option(
name: '--recurse-submodules',
description:
'After the clone is created, initialize and clone submodules within based on the provided pathspec. If no pathspec is provided, all submodules are initialized and cloned. This option can be given multiple times for pathspecs consisting of multiple entries',
args: [Arg(isOptional: true, name: 'pathspec')]),
Option(
name: '--shallow-submodules',
description:
'All submodules which are cloned will be shallow with a depth of 1'),
Option(
name: '--no-shallow-submodules',
description: 'Disable --shallow-submodules'),
Option(
name: '--remote-submodules',
description:
'All submodules which are cloned will use the status of the submodule’s remote-tracking branch to update the submodule, rather than the superproject’s recorded SHA-1. Equivalent to passing --remote to git submodule update'),
Option(
name: '--no-remote-submodules',
description: 'Disable --remote-submodules'),
Option(
name: ['-j', '--jobs'],
description:
'The number of submodules fetched at the same time. Defaults to the submodule.fetchJobs option',
args: [Arg(name: 'n', isOptional: true)]),
Option(
name: '--separate-git-dir',
description:
'Instead of placing the cloned repository where it is supposed to be, place the cloned repository at the specified directory, then make a filesystem-agnostic Git symbolic link to there. The result is Git repository can be separated from working tree',
args: [Arg(name: 'git dir')])
]),
Subcommand(
name: 'init',
description:
'Create an empty Git repository or reinitialize an existing one',
args: [
Arg(name: 'directory', isOptional: true)
],
options: [
Option(
name: ['-q', '--quiet'],
description: 'Only print error and warning messages'),
Option(name: '--bare', description: 'Create a bare repository'),
Option(
name: '--object-format',
description: 'Specify the given object format',
args: [
Arg(name: 'format', suggestions: [
FigSuggestion(name: 'sha1'),
FigSuggestion(name: 'sha256')
])
]),
Option(
name: '--template',
description:
'Specify the directory from which templates will be used',
args: [Arg(name: 'template_directory', template: 'folders')]),
Option(
name: '--separate-git-dir',
description:
'Instead of initializing the repository as a directory to either \$GIT_DIR or ./.git/, create a text file there containing the path to the actual repository. This file acts as filesystem-agnostic Git symbolic link to the repository',
args: [Arg(name: 'git dir')]),
Option(
name: ['-b', '--initial-branch'],
description: 'Initial branch for new repo',
args: [Arg(isOptional: true, name: 'branch-name')]),
Option(
name: '--shared',
description:
'Specify that the Git repository is to be shared amongst several users. This allows users belonging to the same group to push into that repository',
args: [
Arg(isOptional: true, suggestions: [
FigSuggestion(
name: 'false',
description: 'Use permissions reported by umask(2)'),
FigSuggestion(
name: 'true',
description: 'Make the repository group-writable'),
FigSuggestion(
name: 'umask',
description: 'Use permissions reported by umask(2)'),
FigSuggestion(
name: 'group',
description: 'Make the repository group-writable'),
FigSuggestion(
name: 'all',
description:
'Same as group, but make the repository readable by all users'),
FigSuggestion(
name: 'world',
description:
'Same as group, but make the repository readable by all users'),
FigSuggestion(
name: 'everybody',
description:
'Same as group, but make the repository readable by all users'),
FigSuggestion(
name: '0xxx',
description:
'0xxx is an octal number and each file will have mode 0xxx. 0xxx will override users\' umask(2) value (and not only loosen permissions as group and all does)')
])
])
]),
Subcommand(
name: 'mv',
description: 'Move or rename a file, a directory, or a symlink',
args: [
Arg(
name: 'source',
description: 'File to move',
template: 'filepaths'),
Arg(
name: 'destination',
description: 'Location to move to',
template: 'folders')
],
options: [
Option(
name: ['-f', '--force'],
description:
'Force renaming or moving of a file even if the target exists'),
Option(
name: '-k',
description:
'Skip move or rename actions which would lead to an error condition'),
Option(
name: ['-n', '--dry-run'],
description: 'Do nothing; only show what would happen'),
Option(
name: ['-v', '--verbose'],
description: 'Report the names of files as they are moved')
]),
Subcommand(
name: 'rm',
description: 'Remove files from the working tree and from the index',
args: [
Arg(
isVariadic: true,
suggestions: [
FigSuggestion(
name: '.',
description: 'Current directory',
icon: 'fig://icon?type=folder')
],
generators: gitGenerators['files_for_staging'])
],
options: [
Option(
name: '--',
description:
'Used to separate command-line options from the list of files'),
Option(name: '--cached', description: 'Only remove from the index'),
Option(
name: ['-f', '--force'],
description: 'Override the up-to-date check'),
Option(
name: ['-n', '--dry-run'],
description:
'Don’t actually remove any file(s). Instead, just show if they exist in the index and would otherwise be removed by the command'),
Option(name: '-r', description: 'Allow recursive removal')
]),
Subcommand(
name: 'bisect',
description:
'Use binary search to find the commit that introduced a bug',
subcommands: [
Subcommand(
name: 'start',
description: 'Reset bisect state and start bisection',
args: [
Arg(
name: 'bad',
isOptional: true,
generators: gitGenerators['revs'],
suggestions: headSuggestions),
Arg(
name: 'good',
isOptional: true,
generators: [
gitGenerators['revs'],
gitGenerators['revs']
],
suggestions: headSuggestions,
isVariadic: true)
],
options: [
Option(
name: '--term-new',
description:
'Specify the alias to mark commits as new during the bisect process',
args: [
Arg(
name: 'term',
description:
'Specifying: fixed, would require using git bisect fixed instead of git bisect new')
]),
Option(
name: '--term-bad',
description:
'Specify the alias to mark commits as bad during the bisect process',
args: [
Arg(
name: 'term',
description:
'Specifying: broken, would require using git bisect broken instead of git bisect bad')
]),
Option(
name: '--term-good',
description:
'Specify the alias to mark commits as good during the bisect process',
args: [
Arg(
name: 'term',
description:
'Specifying: fixed, would require using git bisect fixed instead of git bisect good')
]),
Option(
name: '--term-old',
description:
'Specify the alias to mark commits as old during the bisect process',
args: [
Arg(
name: 'term',
description:
'Specifying: broken, would require using git bisect broken instead of git bisect old')
]),
Option(
name: '--no-checkout',
description:
'Do not checkout the new working tree at each iteration of the bisection process. Instead just update a special reference named BISECT_HEAD to make it point to the commit that should be tested'),
Option(
name: '--first-parent',
description:
'Follow only the first parent commit upon seeing a merge commit. In detecting regressions introduced through the merging of a branch, the merge commit will be identified as introduction of the bug and its ancestors will be ignored'),
Option(
name: '--',
description:
'Stop taking subcommand arguments and options. Starts taking paths to bisect')
]),
Subcommand(name: 'bad', description: 'Mark commits as bad', args: [
Arg(
name: 'rev',
isOptional: true,
generators: gitGenerators['revs'],
suggestions: headSuggestions)
]),
Subcommand(name: 'new', description: 'Mark commits as new', args: [
Arg(
name: 'rev',
isOptional: true,
generators: gitGenerators['revs'],
suggestions: headSuggestions)
]),
Subcommand(name: 'old', description: 'Mark commits as old', args: [
Arg(
name: 'rev',
isOptional: true,
generators: gitGenerators['revs'],
suggestions: headSuggestions,
isVariadic: true)
]),
Subcommand(
name: 'good',
description: 'Mark commits as good',
args: [
Arg(
name: 'rev',
isOptional: true,
generators: gitGenerators['revs'],
suggestions: headSuggestions,
isVariadic: true)
]),
Subcommand(
name: 'next',
description: 'Find next bisection to test and check it out'),
Subcommand(
name: 'terms',
description:
'Show the terms used for old and new commits (default: bad, good)',
options: [
Option(
name: '--term-old',
description:
'You can get just the old (respectively new) term'),
Option(
name: '--term-good',
description:
'You can get just the old (respectively new) term')
]),
Subcommand(
name: 'skip',
description: 'Mark <rev>... untestable revisions',
args: [
Arg(
name: 'rev | range',
isVariadic: true,
isOptional: true,
generators: gitGenerators['revs'],
suggestions: headSuggestions)
]),
Subcommand(
name: 'reset',
description: 'Finish bisection search and go back to commit',
args: [
Arg(
name: 'commit',
isOptional: true,
generators: gitGenerators['commits'],
suggestions: headSuggestions)
]),
Subcommand(
name: ['visualize', 'view'],
description: 'See the currently remaining suspects in gitk'),
Subcommand(
name: 'replay',
description: 'Replay bisection log',
args: [Arg(name: 'logfile', template: 'filepaths')]),
Subcommand(name: 'log', description: 'Show bisect log'),
Subcommand(
name: 'run',
description: 'Use <cmd>... to automatically bisect',
args: [Arg(name: 'cmd', isVariadic: true)]),
Subcommand(name: 'help', args: [Arg(name: 'Get help text')])
],
args: [
Arg(name: 'paths', template: ['filepaths', 'folders'])
]),
Subcommand(name: 'grep', description: 'Print lines matching a pattern'),
Subcommand(name: 'show', description: 'Show various types of objects'),
Subcommand(
name: 'branch',
description: 'List, create, or delete branches',
options: [
Option(
name: ['-a', '--all'],
exclusiveOn: ['-r', '--remotes'],
description: 'List both remote-tracking and local branches'),
Option(
name: ['-d', '--delete'],
description: 'Delete fully merged branch',
args: [
Arg(
generators: gitGenerators['localOrRemoteBranches'],
isVariadic: true,
suggestions: [
FigSuggestion(
name: ['-r', '--remotes'],
description: 'Deletes the remote-tracking branches')
])
]),
Option(
name: '-D',
description: 'Delete branch (even if not merged)',
args: [
Arg(
generators: gitGenerators['localOrRemoteBranches'],
isVariadic: true,
suggestions: [
FigSuggestion(
name: ['-r', '--remotes'],
description: 'Deletes the remote-tracking branches')
])
]),
Option(
name: ['-m', '--move'],
description: 'Move/rename a branch and its reflog',
args: [
Arg(
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy'),
Arg(
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy')
]),
Option(
name: '-M',
description: 'Move/rename a branch, even if target exists',
args: [
Arg(
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy'),
Arg(
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy')
]),
Option(
name: ['-c', '--copy'],
description: 'Copy a branch and its reflog'),
Option(
name: '-C',
description: 'Copy a branch, even if target exists'),
Option(name: ['-l', '--list'], description: 'List branch names'),
Option(
name: '--create-reflog',
description: 'Create the branch\'s reflog'),
Option(
name: '--edit-description',
description: 'Edit the description for the branch',
args: [
Arg(
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy')
]),
Option(
name: ['-f', '--force'],
description: 'Force creation, move/rename, deletion'),
Option(
name: '--merged',
description: 'Print only branches that are merged',
args: [Arg(name: 'commi')]),
Option(
name: '--no-merged',
description: 'Print only branches that are not merged',
args: [Arg(name: 'commi')]),
Option(
name: '--column',
exclusiveOn: ['--no-column'],
description: 'List branches in columns [=<style>]'),
Option(
name: '--no-column',
exclusiveOn: ['--column'],
description: 'Doesn\'t display branch listing in columns'),
Option(
name: '--sort',
description: 'Field name to sort on',
args: [Arg(name: 'ke')]),
Option(
name: '--points-at',
description: 'Print only branches of the object',
args: [Arg(name: 'objec')]),
Option(
name: ['-i', '--ignore-case'],
description: 'Sorting and filtering are case insensitive'),
Option(
name: '--format',
description: 'Format to use for the output',
args: [Arg(name: 'forma')]),
Option(
name: ['-r', '--remotes'],
exclusiveOn: ['-a', '--all'],
description:
'Lists or deletes (if used with -d) the remote-tracking branches'),
Option(
name: '--show-current',
description: 'Prints the name of the current branch'),
Option(
name: ['-v', '--verbose'],
isRepeatable: 2,
description:
'Shows sha1 and commit subject line for each head, along with relationship to upstream branch when in list mode. If given twice, prints the path of the linked worktree and the name of the upstream branch'),
Option(
name: ['-q', '--quiet'],
description: 'Suppress non-error messages'),
Option(
name: '--abbrev',
description:
'Shows the shortest prefix that is at least <n> hexdigits long that uniquely refers the object',
exclusiveOn: ['--no-abbrev'],
args: [Arg(name: 'Number')]),
Option(
name: '--no-abbrev',
exclusiveOn: ['--abbrev'],
description: 'Displays the full sha1s in the output listing'),
Option(
name: ['-t', '--track'],
exclusiveOn: ['--no-track'],
description:
'When creating a new branch, set up \'upstream\' configuration',
args: [
Arg(
name: 'branch',
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy'),
Arg(
name: 'start point',
isOptional: true,
generators: gitGenerators['commits'])
]),
Option(
name: '--no-track',
exclusiveOn: ['--track', '-t'],
description:
'Do not set up \'upstream\' configuration, even if the branch.autoSetupMerge configuration variable is true',
args: [
Arg(
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy'),
Arg(
isOptional: true,
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy')
]),
Option(
name: ['-u', '--set-upstream-to'],
description: 'Sets branch to upstream provided',
args: [
Arg(
name: 'upstream',
isOptional: true,
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy')
]),
Option(
name: '--unset-upstream',
description: 'Removes the upstream information',
args: [
Arg(
name: 'upstream',
isOptional: true,
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy')
]),
Option(
name: '--contains',
description:
'Only lists branches which contain the specified commit',
args: [
Arg(
name: 'commit',
isOptional: true,
generators: gitGenerators['commits'])
]),
Option(
name: '--no-contains',
description:
'Only lists branches which don\'t contain the specified commit',
args: [
Arg(
name: 'commit',
isOptional: true,
generators: gitGenerators['commits'])
]),
Option(
name: '--color',
description:
'Color branches to highlight current, local, and remote-tracking branches',
exclusiveOn: [
'--no-color'
],
args: [
Arg(name: 'when', isOptional: true, suggestions: [
FigSuggestion(name: 'always'),
FigSuggestion(name: 'never'),
FigSuggestion(name: 'auto')
])
]),
Option(
name: '--no-color',
description: 'Turns off branch colors',
exclusiveOn: ['--color'])
]),
Subcommand(
name: 'checkout',
description: 'Switch branches or restore working tree files',
options: [
Option(
name: ['-q', '--quiet'],
description: 'Quiet, suppress feedback messages'),
Option(
name: '--progress',
description:
'Progress status is reported on the standard error stream by default when it is attached to a terminal, unless --quiet is specified. This flag enables progress reporting even if not attached to a terminal, regardless of --quiet'),
Option(
name: '--no-progress',
description: 'Disable progress status reporting'),
Option(
name: ['-f', '--force'],
description:
'When switching branches, proceed even if the index or the working tree differs from HEAD. This is used to throw away local changes'),
Option(
name: ['-2', '--ours'],
description:
'When checking out paths from the index, check out stage #2 (ours) for unmerged paths'),
Option(
name: ['-3', '--theirs'],
description:
'When checking out paths from the index, check out stage #3 (theirs) for unmerged paths'),
Option(
name: '-b',
description:
'Create a new branch named <new_branch> and start it at <start_point>; see git-branch[1] for details',
args: [Arg(name: 'New Branch')]),
Option(
name: '-B',
description:
'Creates the branch <new_branch> and start it at <start_point>; if it already exists, then reset it to <start_point>. This is equivalent to running \'git branch\' with \'-f\'; see git-branch[1] for details',
args: [Arg(name: 'New Branch')]),
Option(
name: ['-t', '--track'],
description:
'When creating a new branch, set up \'upstream\' configuration'),
Option(
name: '--no-track',
description:
'Do not set up \'upstream\' configuration, even if the branch.autoSetupMerge configuration variable is true'),
Option(
name: '--guess',
description:
'If <branch> is not found but there does exist a tracking branch in exactly one remote (call it <remote>) with a matching name, treat as equivalent to \$ git checkout -b <branch> --track <remote>/<branch>'),
Option(name: '--no-guess', description: 'Disable --guess'),
Option(
name: '-l',
description:
'Create the new branch’s reflog; see git-branch[1] for details'),
Option(
name: ['-d', '--detach'],
description:
'Rather than checking out a branch to work on it, check out a commit for inspection and discardable experiments. This is the default behavior of git checkout <commit> when <commit> is not a branch name'),
Option(
name: '--orphan',
description:
'Create a new orphan branch, named <new_branch>, started from <start_point> and switch to it',
args: [Arg(name: 'New Branch')]),
Option(
name: '--ignore-skip-worktree-bits',
description:
'In sparse checkout mode, git checkout -- <paths> would update only entries matched by <paths> and sparse patterns in \$GIT_DIR/info/sparse-checkout. This option ignores the sparse patterns and adds back any files in <paths>'),
Option(
name: ['-m', '--merge'],
description:
'When switching branches, if you have local modifications to one or more files that are different between the current branch and the branch to which you are switching, the command refuses to switch branches in order to preserve your modifications in context'),
Option(
name: '--conflict',
description:
'The same as --merge option above, but changes the way the conflicting hunks are presented, overriding the merge.conflictStyle configuration variable. Possible values are \'merge\' (default) and \'diff3\' (in addition to what is shown by \'merge\' style, shows the original contents)',
args: [
Arg(isOptional: true, suggestions: [
FigSuggestion(name: 'merge'),
FigSuggestion(name: 'diff3')
])
]),
Option(
name: ['-p', '--patch'],
description:
'Interactively select hunks in the difference between the <tree-ish> (or the index, if unspecified) and the working tree'),
Option(
name: '--ignore-other-worktrees',
description:
'Git checkout refuses when the wanted ref is already checked out by another worktree. This option makes it check the ref out anyway. In other words, the ref can be held by more than one worktree'),
Option(
name: '--overwrite-ignore',
description:
'Silently overwrite ignored files when switching branches. This is the default behavior'),
Option(
name: '--no-overwrite-ignore',
description:
'Use --no-overwrite-ignore to abort the operation when the new branch contains ignored files'),
Option(
name: '--recurse-submodules',
description:
'Using --recurse-submodules will update the content of all active submodules according to the commit recorded in the superproject. If local modifications in a submodule would be overwritten the checkout will fail unless -f is used. If nothing (or --no-recurse-submodules) is used, submodules working trees will not be updated. Just like git-submodule[1], this will detach HEAD of the submodule'),
Option(
name: '--no-recurse-submodules',
description: 'Submodules working trees will not be updated'),
Option(
name: '--overlay',
description:
'In the default overlay mode, git checkout never removes files from the index or the working tree'),
Option(
name: '--no-overlay',
description:
'When specifying --no-overlay, files that appear in the index and working tree, but not in <tree-ish> are removed, to make them match <tree-ish> exactly'),
Option(
name: '--pathspec-from-file',
description:
'Pathspec is passed in <file> instead of commandline args',
args: [Arg(name: 'file', template: 'filepaths')]),
Option(
name: '--pathspec-file-nul',
description: 'Only meaningful with --pathspec-from-file')
],
args: [
Arg(
name: 'branch, file, tag or commit',
description: 'Branch, file, tag or commit to switch to',
isOptional: true,
filterStrategy: 'fuzzy',
generators: [
gitGenerators['remoteLocalBranches'],
gitGenerators['tags'],
Generator(template: ['filepaths', 'folders'])
],
suggestions: [
FigSuggestion(
name: '-',
description: 'Switch to the last used branch',
icon: 'fig://icon?type=git'),
FigSuggestion(
name: '--',
description: 'Do not interpret more arguments as options',
hidden: true)
]),
Arg(
name: 'pathspec',
description: 'Limits the paths affected by the operation',
isOptional: true,
isVariadic: true,
template: 'filepaths')
]),
Subcommand(
name: 'cherry-pick',
description: 'Apply the changes introduced by some existing commits',
args: [
Arg(
name: 'commit',
description: 'Commits to cherry-pick',
isVariadic: true,
generators: gitGenerators['commits'])
],
options: [
Option(
name: '--continue',
description:
'Continue the operation in progress using the information in .git/sequencer'),
Option(
name: '--skip',
description:
'Skip the current commit and continue with the rest of the sequence'),
Option(
name: '--quit',
description: 'Forget about the current operation in progress'),
Option(
name: '--abort',
description:
'Cancel the operation and return to the pre-sequence state'),
Option(
name: ['-e', '--edit'],
description:
'With this option, git cherry-pick will let you edit the commit message prior to committing'),
Option(
name: '--cleanup',
description:
'This option determines how the commit message will be cleaned up before being passed on to the commit machinery',
args: [
Arg(
name: 'mode',
description:
'Determines how the supplied commit messaged should be cleaned up before committing',
suggestions: [
FigSuggestion(
name: 'strip',
description:
'Strip leading and trailing empty lines, trailing whitepace, commentary and collapse consecutive empty lines'),
FigSuggestion(
name: 'whitespace',
description:
'Same as strip except #commentary is not removed'),
FigSuggestion(
name: 'verbatim',
description: 'Do not change the message at all'),
FigSuggestion(
name: 'scissors',
description:
'Same as whitespace except that everything from (and including) the line found below is truncated'),
FigSuggestion(
name: 'default',
description:
'Same as strip if the message is to be edited. Otherwise whitespace')
])
]),
Option(
name: '-x',
description:
'When recording the commit, append a line that says "(cherry picked from commit ...)" to the original commit message in order to indicate which commit this change was cherry-picked from'),
Option(
name: ['-m', '--mainline'],
description:
'Specifies the parent number (starting from 1) of the mainline and allows cherry-pick to replay the change relative to the specified parent',
args: [Arg(name: 'parent-number')]),
Option(
name: ['-n', '--no-commit'],
description:
'Applies changes necessary to cherry-pick each named commit to your working tree and the index without making any commit'),
Option(
name: ['-s', '--signoff'],
description:
'Add a Signed-off-by trailer at the end of the commit message'),
Option(
name: ['-S', '--gpg-sign'],
exclusiveOn: ['--no-gpg-sign'],
description: 'GPG-sign commits',
args: [
Arg(
name: 'keyid',
description:
'Must be stuck to the option without a space',
isOptional: true)
]),
Option(
name: '--no-gpg-sign',
exclusiveOn: ['-S', '--gpg-sign'],
description:
'Useful to countermand both commit.gpgSign configuration variable, and earlier --gpg-sign'),
Option(
name: '--ff',
description:
'If the current HEAD is the same as the parent of the cherry-pick\'ed commit, the a fast forward to this commit will be performed'),
Option(
name: '--allow-empty',
description:
'Allow empty commits to be preserved automatically in a cherry-pick'),
Option(
name: '--allow-empty-message',
description:
'Allow commits with empty messages to be cherry picked'),
Option(
name: '--keep-redundant-commits',
description:
'Creates an empty commit object. Implies --allow-empty'),
Option(
name: '--strategy',
description:
'Use the given merge strategy. Should only be used once',
args: [
Arg(name: 'strategy', suggestions: [
FigSuggestion(name: 'resolve'),
FigSuggestion(name: 'recursive'),
FigSuggestion(name: 'octopus'),
FigSuggestion(name: 'ours'),
FigSuggestion(name: 'subtree')
])
]),
Option(
name: ['-X', '--strategy-option'],
description:
'Pass the merge strategy-specific option through to the merge strategy',
args: [
Arg(name: 'option', suggestions: [
FigSuggestion(name: 'ours'),
FigSuggestion(name: 'theirs'),
FigSuggestion(name: 'patience'),
FigSuggestion(name: 'diff-algorithm'),
FigSuggestion(name: 'diff-algorithm=patience'),
FigSuggestion(name: 'diff-algorithm=minimal'),
FigSuggestion(name: 'diff-algorithm=histogram'),
FigSuggestion(name: 'diff-algorithm=myers'),
FigSuggestion(name: 'ignore-space-change'),
FigSuggestion(name: 'ignore-all-space'),
FigSuggestion(name: 'ignore-space-at-eol'),
FigSuggestion(name: 'ignore-cr-at-eol'),
FigSuggestion(name: 'renormalize'),
FigSuggestion(name: 'no-renormalize'),
FigSuggestion(name: 'no-renames'),
FigSuggestion(name: 'find-renames'),
FigSuggestion(name: 'subtree')
])
]),
Option(
name: '--rerere-autoupdate',
exclusiveOn: ['--no-rerere-autoupdate'],
description:
'Allow the rerere mechanism to update the index with the result of auto-conflict resolution if possible'),
Option(
name: '--no-rerere-autoupdate',
exclusiveOn: ['--rerere-autoupdate'],
description:
'Do not allow the rerere mechanism to update the index with the result of auto-conflict resolution if possible')
]),
Subcommand(
name: 'submodule',
description: 'Initialize, update or inspect submodules',
subcommands: [
Subcommand(
name: 'add',
description:
'Add the given repository as a submodule at the given path to the changeset to be committed next to the current project',
options: [
Option(
name: '-b',
description: 'Branch of repository to add as submodule',
args: [Arg(name: 'branch')]),
Option(
name: ['-f', '--force'],
description:
'Allow adding an otherwise ignored submodule path'),
Option(
name: '--name',
description:
'It sets the submodule’s name to the given string instead of defaulting to its path',
insertValue: '--name \'{cursor}\'',
args: [Arg(name: 'name', description: 'Directory name')]),
Option(
name: '--reference',
description: 'Remote repository to be cloned',
args: [
Arg(
name: 'repository',
description: 'Remote repository to be cloned')
]),
Option(
name: '--depth',
description:
'Create a shallow clone with a history truncated to the specified number of revisions',
args: [
Arg(
name: 'depth',
description: 'Specified number of revisions')
]),
Option(name: '--', description: 'End of subcommand options')
],
args: [
Arg(name: 'repository'),
Arg(name: 'path', isOptional: true, template: 'filepaths')
]),
Subcommand(
name: 'status',
description: 'Show the status of the submodules',
options: [
Option(
name: '--cached',
description:
'Will instead print the SHA-1 recorded in the superproject for each submodule'),
Option(
name: '--recursive',
description:
'Will recurse into nested submodules, and show their status as well'),
Option(name: '--', description: 'End of subcommand options')
],
args: [
Arg(
name: 'path',
isOptional: true,
isVariadic: true,
template: 'filepaths')
]),
Subcommand(
name: 'init',
description: 'Initialize the submodules recorded in the index',
options: [
Option(name: '--', description: 'End of subcommand options')
],
args: [
Arg(
name: 'path',
isOptional: true,
isVariadic: true,
template: 'filepaths')
]),
Subcommand(
name: 'deinit',
description: 'Unregister the given submodules',
options: [
Option(
name: ['-f', '--force'],
description:
'The submodule’s working tree will be removed even if it contains local modifications'),
Option(
name: '--all',
description:
'Unregister all submodules in the working tree'),
Option(name: '--', description: 'End of subcommand options')
],
args: [
Arg(
name: 'path',
isOptional: true,
isVariadic: true,
template: 'filepaths')
]),
Subcommand(
name: 'update',
description:
'Update the registered submodules to match what the superproject expects by cloning missing submodules, fetching missing commits in submodules and updating the working tree of the submodules',
options: [
Option(
name: '--init',
description:
'Initialize all submodules for which \'git submodule init\' has not been called so far before updating'),
Option(
name: '--remote',
description:
'Instead of using the superproject’s recorded SHA-1 to update the submodule, use the status of the submodule’s remote-tracking branch'),
Option(
name: ['-N', '--no-fetch'],
description:
'Don’t fetch new objects from the remote site'),
Option(
name: '--no-recommend-shallow',
description: 'Ignore the suggestions'),
Option(
name: '--recommend-shallow',
description:
'The initial clone of a submodule will use the recommended submodule.<name>.shallow as provided by the .gitmodules file'),
Option(
name: ['-f', '--force'],
description:
'Throw away local changes in submodules when switching to a different commit; and always run a checkout operation in the submodule, even if the commit listed in the index of the containing repository matches the commit checked out in the submodule'),
Option(
name: '--checkout',
description:
'The commit recorded in the superproject will be checked out in the submodule on a detached HEAD'),
Option(
name: '--rebase',
description:
'The current branch of the submodule will be rebased onto the commit recorded in the superproject'),
Option(
name: '--merge',
description:
'The commit recorded in the superproject will be merged into the current branch in the submodule'),
Option(
name: '--reference',
description: 'Remote repository',
args: [Arg(name: 'repository')]),
Option(
name: '--depth',
description:
'Create a shallow clone with a history truncated to the specified number of revisions',
args: [Arg(name: 'depth')]),
Option(
name: '--recursive',
description: 'Traverse submodules recursively'),
Option(
name: '--jobs',
description:
'Clone new submodules in parallel with as many jobs',
args: [Arg(name: 'n')]),
Option(
name: '--single-branch',
description:
'Clone only one branch during update: HEAD or one specified by --branch'),
Option(
name: '--no-single-branch',
description:
'Don\'t clone only one branch during update: HEAD or one specified by --branch'),
Option(name: '--', description: 'End of subcommand options')
],
args: [
Arg(
name: 'path',
isOptional: true,
isVariadic: true,
template: 'filepaths')
]),
Subcommand(
name: 'set-branch',
description:
'Sets the default remote tracking branch for the submodule',
options: [
Option(
name: ['-b', '--branch'],
description: 'Branch of repository to add as submodule',
args: [
Arg(
name: 'branch',
description: 'Remote branch to be specified')
]),
Option(
name: ['-d', '--default'],
description:
'Removes the submodule.<name>.branch configuration key, which causes the tracking branch to default to the remote HEAD'),
Option(name: '--', description: 'End of subcommand options')
],
args: [
Arg(
name: 'path',
description: 'Path to submodule',
template: 'filepaths')
]),
Subcommand(
name: 'set-url',
description:
'Sets the URL of the specified submodule to <newurl>',
options: [
Option(name: '--', description: 'End of command options')
],
args: [
Arg(
name: 'path',
description: 'Path to specified submodule',
template: 'filepaths'),
Arg(name: 'newurl', description: 'New url of submodule')
]),
Subcommand(
name: 'summary',
description:
'Show commit summary between the given commit (defaults to HEAD) and working tree/index',
options: [
Option(
name: '--cached',
description:
'This command will recurse into the registered submodules, and sync any nested submodules within'),
Option(
name: '--files',
description:
'Show the series of commits in the submodule between the index of the super project and the working tree of the submodule'),
Option(
name: '-n',
description:
'Limit the summary size (number of commits shown in total). Giving 0 will disable the summary; a negative number means unlimited (the default). This limit only applies to modified submodules. The size is always limited to 1 for added/deleted/typechanged submodules',
args: [Arg(name: 'n')]),
Option(
name: '--summary-limit',
description:
'Limit the summary size (number of commits shown in total). Giving 0 will disable the summary; a negative number means unlimited (the default). This limit only applies to modified submodules. The size is always limited to 1 for added/deleted/typechanged submodules',
args: [Arg(name: 'n')]),
Option(
name: '--',
description: 'Everything after this is an argument')
],
args: [
Arg(name: 'commit', isOptional: true),
Arg(
name: 'path',
isOptional: true,
isVariadic: true,
template: 'filepaths')
]),
Subcommand(
name: 'foreach',
description:
'Evaluates an arbitrary shell command in each checked out submodule',
options: [
Option(
name: '--recursive',
description:
'This command will recurse into the registered submodules, and sync any nested submodules within')
],
args: [
Arg(name: 'command')
]),
Subcommand(
name: 'sync',
description:
'Synchronizes submodules\' remote URL configuration setting to the value specified in .gitmodules',
options: [
Option(
name: '--recursive',
description:
'This command will recurse into the registered submodules, and sync any nested submodules within'),
Option(
name: '--',
description: 'Everything after this is an argument')
],
args: [
Arg(
name: 'path',
isOptional: true,
isVariadic: true,
template: 'filepaths')
]),
Subcommand(
name: 'absorbgitdirs',
description:
'If a git directory of a submodule is inside the submodule, move the git directory of the submodule into its superproject’s \$GIT_DIR/modules path and then connect the git directory and its working directory by setting the core.worktree and adding a .git file pointing to the git directory embedded in the superprojects git directory')
],
options: [
Option(
name: ['-q', '--quiet'],
description: 'Only print error messages'),
Option(
name: '--cached',
description: 'The commit stored in the index is used instead')
]),
Subcommand(
name: 'merge',
description: 'Join two or more development histories together',
args: [
Arg(
name: 'branch',
filterStrategy: 'fuzzy',
generators: gitGenerators['remoteLocalBranches'],
isVariadic: true,
isOptional: true,
suggestions: [
FigSuggestion(
name: '-',
description: 'Shorthand for the previous branch')
])
],
options: [
Option(
name: '--commit',
description:
'Perform the merge and commit the result. This option can be used to override --no-commit'),
Option(
name: '--no-commit',
description:
'Perform the merge and stop just before creating a merge commit, to give the user a chance to inspect and further tweak the merge result before committing'),
Option(
name: ['--edit', '-e'],
description:
'Invoke an editor before committing successful mechanical merge to further edit the auto-generated merge message, so that the user can explain and justify the merge'),
Option(
name: '--no-edit',
description:
'The --no-edit option can be used to accept the auto-generated message (this is generally discouraged). The --edit (or -e) option is still useful if you are giving a draft message with the -m option from the command line and want to edit it in the editor'),
Option(
name: '--cleanup',
description:
'This option determines how the merge message will be cleaned up before committing. See git-commit[1] for more details. In addition, if the <mode> is given a value of scissors, scissors will be appended to MERGE_MSG before being passed on to the commit machinery in the case of a merge conflict',
args: [
Arg(name: 'mode', suggestions: [
FigSuggestion(name: 'strip'),
FigSuggestion(name: 'whitespace'),
FigSuggestion(name: 'verbatim'),
FigSuggestion(name: 'scissors'),
FigSuggestion(name: 'default')
])
]),
Option(
name: '--ff',
description:
'When possible resolve the merge as a fast-forward (only update the branch pointer to match the merged branch; do not create a merge commit). When not possible (when the merged-in history is not a descendant of the current history), create a merge commit'),
Option(
name: '--no-ff',
description:
'Create a merge commit in all cases, even when the merge could instead be resolved as a fast-forward'),
Option(
name: '--ff-only',
description:
'Resolve the merge as a fast-forward when possible. When not possible, refuse to merge and exit with a non-zero status'),
Option(
name: ['-S', '--gpg-sign'],
description:
'GPG-sign the resulting merge commit. The keyid argument is optional and defaults to the committer identity; if specified, it must be stuck to the option without a space',
args: [Arg(name: 'keyid', isOptional: true)]),
Option(
name: '--no-gpg-sign',
description:
'Is useful to countermand both commit.gpgSign configuration variable, and earlier --gpg-sign'),
Option(
name: '--log',
description:
'In addition to branch names, populate the log message with one-line descriptions from at most <n> actual commits that are being merged. See also git-fmt-merge-msg[1]',
args: [Arg(name: 'n', isOptional: true)]),
Option(
name: '--no-log',
description:
'Do not list one-line descriptions from the actual commits being merged'),
Option(
name: '--signoff',
description:
'Add a Signed-off-by trailer by the committer at the end of the commit log message. The meaning of a signoff depends on the project to which you’re committing. For example, it may certify that the committer has the rights to submit the work under the project’s license or agrees to some contributor representation, such as a Developer Certificate of Origin. (See http://developercertificate.org for the one used by the Linux kernel and Git projects.) Consult the documentation or leadership of the project to which you’re contributing to understand how the signoffs are used in that project'),
Option(
name: '--no-signoff',
description:
'Can be used to countermand an earlier --signoff option on the command line'),
Option(
name: '--stat',
description:
'Show a diffstat at the end of the merge. The diffstat is also controlled by the configuration option merge.stat'),
Option(
name: ['-n', '--no-stat'],
description: 'Do not show a diffstat at the end of the merge'),
Option(
name: '--squash',
description:
'With --squash, --commit is not allowed, and will fail. Produce the working tree and index state as if a real merge happened (except for the merge information), but do not actually make a commit, move the HEAD, or record \$GIT_DIR/MERGE_HEAD (to cause the next git commit command to create a merge commit). This allows you to create a single commit on top of the current branch whose effect is the same as merging another branch (or more in case of an octopus)'),
Option(
name: '--no-squash',
description:
'Perform the merge and commit the result. This option can be used to override --squash'),
Option(
name: '--no-verify',
description:
'This option bypasses the pre-merge and commit-msg hooks. See also githooks[5]'),
Option(
name: ['-s', '--strategy'],
description:
'Use the given merge strategy; can be supplied more than once to specify them in the order they should be tried. If there is no -s option, a built-in list of strategies is used instead (git merge-recursive when merging a single head, git merge-octopus otherwise)',
args: [
Arg(name: 'strategy', isVariadic: true, suggestions: [
FigSuggestion(name: 'resolve'),
FigSuggestion(name: 'recursive'),
FigSuggestion(name: 'octopus'),
FigSuggestion(name: 'ours'),
FigSuggestion(name: 'subtree')
])
]),
Option(
name: ['-X', '--strategy-option'],
description:
'Pass merge strategy specific option through to the merge strategy',
args: [
Arg(name: 'option', suggestions: [
FigSuggestion(name: 'ours'),
FigSuggestion(name: 'theirs'),
FigSuggestion(name: 'patience'),
FigSuggestion(name: 'diff-algorithm'),
FigSuggestion(name: 'diff-algorithm=patience'),
FigSuggestion(name: 'diff-algorithm=minimal'),
FigSuggestion(name: 'diff-algorithm=histogram'),
FigSuggestion(name: 'diff-algorithm=myers'),
FigSuggestion(name: 'ignore-space-change'),
FigSuggestion(name: 'ignore-all-space'),
FigSuggestion(name: 'ignore-space-at-eol'),
FigSuggestion(name: 'ignore-cr-at-eol'),
FigSuggestion(name: 'renormalize'),
FigSuggestion(name: 'no-renormalize'),
FigSuggestion(name: 'no-renames'),
FigSuggestion(name: 'find-renames'),
FigSuggestion(name: 'subtree')
])
]),
Option(
name: '--verify-signatures',
description:
'Verify that the tip commit of the side branch being merged is signed with a valid key, i.e. a key that has a valid uid: in the default trust model, this means the signing key has been signed by a trusted key. If the tip commit of the side branch is not signed with a valid key, the merge is aborted'),
Option(
name: '--no-verify-signatures',
description:
'Do not verify that the tip commit of the side branch being merged is signed with a valid key'),
Option(
name: '--summary',
description:
'Synonym to --stat ; this is deprecated and will be removed in the future'),
Option(
name: '--no-summary',
description:
'Synonym to --no-stat ; this is deprecated and will be removed in the future'),
Option(
name: ['-q', '--quiet'],
description: 'Operate quietly. Implies --no-progress'),
Option(name: ['-v', '--verbose'], description: 'Be verbose'),
Option(
name: '--progress',
description:
'Turn progress on/off explicitly. If neither is specified, progress is shown if standard error is connected to a terminal. Note that not all merge strategies may support progress reporting'),
Option(
name: '--no-progress',
description:
'Turn progress on/off explicitly. If neither is specified, progress is shown if standard error is connected to a terminal. Note that not all merge strategies may support progress reporting'),
Option(
name: '--autostash',
description:
'Automatically create a temporary stash entry before the operation begins, and apply it after the operation ends. This means that you can run the operation on a dirty worktree. However, use with care: the final stash application after a successful merge might result in non-trivial conflicts'),
Option(
name: '--no-autostash',
description:
'Do not automatically create a temporary stash entry before the operation begins, and apply it after the operation ends'),
Option(
name: '--allow-unrelated-histories',
description:
'By default, git merge command refuses to merge histories that do not share a common ancestor. This option can be used to override this safety when merging histories of two projects that started their lives independently. As that is a very rare occasion, no configuration variable to enable this by default exists and will not be added'),
Option(
name: '-m',
description:
'Set the commit message to be used for the merge commit (in case one is created). If --log is specified, a shortlog of the commits being merged will be appended to the specified message. The git fmt-merge-msg command can be used to give a good default for automated git merge invocations. The automated message can include the branch description',
args: [Arg(name: 'message')]),
Option(
name: ['-F', '--file'],
description:
'Read the commit message to be used for the merge commit (in case one is created). If --log is specified, a shortlog of the commits being merged will be appended to the specified message',
args: [Arg(name: 'file', template: 'filepaths')]),
Option(
name: '--rerere-autoupdate',
description:
'Allow the rerere mechanism to update the index with the result of auto-conflict resolution if possible'),
Option(
name: '--no-rerere-autoupdate',
description:
'Do not allow the rerere mechanism to update the index with the result of auto-conflict resolution if possible'),
Option(
name: '--overwrite-ignore',
description:
'Silently overwrite ignored files from the merge result. This is the default behavior. Use --no-overwrite-ignore to abort'),
Option(
name: '--no-overwrite-ignore',
description:
'Do not silently overwrite ignored files from the merge result'),
Option(
name: '--abort',
description:
'Abort the current conflict resolution process, and try to reconstruct the pre-merge state. If an autostash entry is present, apply it to the worktree. If there were uncommitted worktree changes present when the merge started, git merge --abort will in some cases be unable to reconstruct these changes. It is therefore recommended to always commit or stash your changes before running git merge. git merge --abort is equivalent to git reset --merge when MERGE_HEAD is present unless MERGE_AUTOSTASH is also present in which case git merge --abort applies the stash entry to the worktree whereas git reset --merge will save the stashed changes in the stash list'),
Option(
name: '--quit',
description:
'Forget about the current merge in progress. Leave the index and the working tree as-is. If MERGE_AUTOSTASH is present, the stash entry will be saved to the stash list'),
Option(
name: '--continue',
description:
'After a git merge stops due to conflicts you can conclude the merge by running git merge --continue (see \'HOW TO RESOLVE CONFLICTS\' section below)')
]),
Subcommand(
name: 'mergetool', description: 'Open the git tool to fix conflicts'),
Subcommand(
name: 'tag',
description:
'Create, list, delete or verify a tag object signed with GPG',
options: [
Option(name: ['-l', '--list'], description: 'List tag names'),
Option(
name: '-n',
description: 'Print <n> lines of each tag message',
args: [
Arg(name: 'n', suggestions: [
FigSuggestion(name: '1'),
FigSuggestion(name: '2'),
FigSuggestion(name: '3')
])
]),
Option(name: ['-d', '--delete'], description: 'Delete tags'),
Option(name: ['-v', '--verify'], description: 'Verify tags'),
Option(
name: ['-a', '--annotate'],
description: 'Annotated tag, needs a message'),
Option(
name: ['-m', '--message'],
insertValue: '-m \'{cursor}\'',
description: 'Tag message',
args: [Arg(name: 'messag')]),
Option(
name: '--points-at',
description: 'List tags of the given object',
args: [
Arg(
name: 'object',
generators: gitGenerators['commits'],
suggestions: headSuggestions)
])
],
args: [
Arg(
name: 'tagname',
description: 'Select a tag',
generators: gitGenerators['tags'],
isOptional: true)
]),
Subcommand(
name: 'restore',
description: 'Restore working tree files',
options: [
Option(
name: ['-s', '--source'],
description:
'Restore the working tree files with the content from the given tree',
args: [Arg(name: 'tree')]),
Option(
name: ['-p', '--patch'],
description:
'Interactively select hunks in the difference between the restore source and the restore location'),
Option(
name: ['-W', '--worktree'],
description: 'Use the worktree as the restore location'),
Option(
name: ['-S', '--staged'],
description: 'Use staging as the restore location'),
Option(
name: ['-q', '--quiet'],
description: 'Quiet, suppress feedback messages'),
Option(
name: '--progress',
description:
'Progress status is reported on the standard error stream by default when it is attached to a terminal'),
Option(
name: '--no-progress',
description: 'Disable progress status reporting'),
Option(
name: ['-2', '--ours'],
description:
'When restoring paths from the index, check out stage #2 (ours) for unmerged paths',
exclusiveOn: ['--theirs']),
Option(
name: ['-3', '--theirs'],
description:
'When re out paths from the index, check out stage #3 (theirs) for unmerged paths',
exclusiveOn: ['--ours']),
Option(
name: ['-m', '--merge'],
description:
'When restoring files on the working tree from the index, recreate the conflicted merge in the unmerged paths'),
Option(
name: '--conflict',
description:
'The same as --merge option, but changes the way the conflicting hunks are presented',
args: [
Arg(name: 'style', suggestions: [
FigSuggestion(name: 'merge'),
FigSuggestion(name: 'diff3')
])
]),
Option(
name: '--ignore-unmerged',
description:
'When restoring files on the working tree from the index, do not abort the operation if there are unmerged entries',
exclusiveOn: ['--ours', '--theirs', '--merge', '--conflict']),
Option(
name: '--ignore-skip-worktree-bits',
description:
'In sparse checkout mode, by default is to only update entries matched by <pathspec> and sparse patterns in \$GIT_DIR/info/sparse-checkout'),
Option(
name: '--recurse-submodules',
description:
'If <pathspec> names an active submodule and the restore location includes the working tree, the submodule will only be updated if this option is given, in which case its working tree will be restored to the commit recorded in the superproject, and any local modifications overwritten',
exclusiveOn: ['--no-recurse-submodules']),
Option(
name: '--no-recurse-submodules',
description: 'Submodules working trees will not be updated',
exclusiveOn: ['--recurse-submodules']),
Option(
name: '--overlay',
description:
'In overlay mode, the command never removes files when restoring',
exclusiveOn: ['--no-overlay']),
Option(
name: '--no-overlay',
description:
'In no-overlay mode, tracked files that do not appear in the --source tree are removed, to make them match <tree> exactly',
exclusiveOn: ['--overlay']),
Option(
name: '--pathspec-from-file',
description:
'Pathspec is passed in <file> instead of commandline args. If <file> is exactly - then standard input is used',
args: [Arg(name: 'file', template: 'filepaths')]),
Option(
name: '--pathspec-file-nul',
description:
'Only meaningful with --pathspec-from-file. Pathspec elements are separated with NUL character and all other characters are taken literally (including newlines and quotes)'),
Option(
name: '--',
description: 'Do not interpret any more arguments as options')
],
args: [
Arg(
name: 'pathspec',
isOptional: true,
isVariadic: true,
generators: gitGenerators['files_for_staging'])
]),
Subcommand(name: 'switch', description: 'Switch branches', options: [
Option(
name: ['-c', '--create'],
description:
'Create a new branch named <new-branch> starting at <start-point> before switching to the branch',
args: [
Arg(name: 'new branch'),
Arg(
name: 'start point',
isOptional: true,
generators: gitGenerators['commits'])
]),
Option(
name: ['-C', '--force-create'],
description:
'Similar to --create except that if <new-branch> already exists it will be reset to <start-point>',
args: [
Arg(name: 'new branch'),
Arg(
name: 'start point',
isOptional: true,
generators: gitGenerators['commits'])
]),
Option(
name: ['-d', '--detach'],
description:
'Switch to a commit for inspection and discardable experiments'),
Option(
name: '--guess',
description:
'If <branch> is not found but there does exist a tracking branch in exactly one remote (call it <remote>) with a matching name'),
Option(name: '--no-guess', description: 'Disable --guess'),
Option(
name: ['-f', '--force'],
description: 'An alias for --discard-changes',
isDangerous: true),
Option(
name: '--discard-changes',
description:
'Proceed even if the index or the working tree differs from HEAD. Both the index and working tree are restored to match the switching target',
isDangerous: true),
Option(
name: ['-m', '--merge'],
description:
'If you have local modifications to one or more files that are different between the current branch and the branch to which you are switching, the command refuses to switch branches in order to preserve your modifications in context'),
Option(
name: '--conflict',
description:
'The same as --merge option above, but changes the way the conflicting hunks are presented, overriding the merge.conflictStyle configuration variable',
args: [
Arg(
name: 'style',
suggestions: [
FigSuggestion(name: 'merge'),
FigSuggestion(name: 'diff3')
],
defaultValue: 'merge')
]),
Option(
name: ['-q', '--quiet'],
description: 'Quiet, suppress feedback messages'),
Option(
name: '--progress',
description:
'Progress status is reported on the standard error stream by default when it is attached to a terminal'),
Option(
name: '--no-progress',
description: 'Disable progress status reporting'),
Option(
name: ['-t', '--track'],
exclusiveOn: ['--no-track'],
description:
'When creating a new branch, set up \'upstream\' configuration',
args: [
Arg(
name: 'branch',
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy'),
Arg(
name: 'start point',
isOptional: true,
generators: gitGenerators['commits'])
]),
Option(
name: '--no-track',
exclusiveOn: ['--track', '-t'],
description:
'Do not set up \'upstream\' configuration, even if the branch.autoSetupMerge configuration variable is true',
args: [
Arg(
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy'),
Arg(
isOptional: true,
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy')
]),
Option(
name: '--orphan',
description: 'Create a new orphan branch, named <new-branch>',
args: [Arg(name: 'new branch')]),
Option(
name: '--ignore-other-worktrees',
description:
'Git switch refuses when the wanted ref is already checked out by another worktree'),
Option(
name: '--recurse-submodules',
exclusiveOn: ['--no-recurse-submodules'],
description:
'Updates the content of all active submodules according to the commit recorded in the superproject'),
Option(
name: '--no-recurse-submodules',
exclusiveOn: ['--recurse-submodules'],
description: 'Submodules working trees will not be updated')
], args: [
Arg(
name: 'branch name',
description: 'Branch or commit to switch to',
generators: gitGenerators['localBranches'],
filterStrategy: 'fuzzy',
suggestions: [
FigSuggestion(
name: '-',
description: 'Switch to the last used branch',
icon: 'fig://icon?type=git')
]),
Arg(
name: 'start point',
isOptional: true,
generators: gitGenerators['commits'])
]),
Subcommand(
name: 'worktree',
description: 'Manage multiple working trees',
subcommands: [
Subcommand(
name: 'add',
description: 'Create <path> and checkout <commit-ish> into it',
options: [
Option(
name: ['-f', '--force'],
description:
'By default, add refuses to create a new working tree when <commit-ish> is a branch name and is already checked out by another working tree, or if <path> is already assigned to some working tree but is missing (for instance, if <path> was deleted manually). This option overrides these safeguards. To add a missing but locked working tree path, specify --force twice'),
Option(
name: ['-d', '--detach'],
description:
'With add, detach HEAD in the new working tree. See "DETACHED HEAD" in git-checkout[1]'),
Option(
name: '--checkout',
description:
'By default, add checks out <commit-ish>, however, --no-checkout can be used to suppress checkout in order to make customizations, such as configuring sparse-checkout. See "Sparse checkout" in git-read-tree[1]'),
Option(
name: '--lock',
description:
'Keep the working tree locked after creation. This is the equivalent of git worktree lock after git worktree add, but without a race condition'),
Option(
name: ['-b', '-B'],
description:
'With add, create a new branch named <new-branch> starting at <commit-ish>, and check out <new-branch> into the new working tree. If <commit-ish> is omitted, it defaults to HEAD. By default, -b refuses to create a new branch if it already exists. -B overrides this safeguard, resetting <new-branch> to <commit-ish>',
args: [Arg(name: 'new-branch')])
]),
Subcommand(
name: 'list',
description: 'List details of each working tree',
options: [
Option(
name: '--porcelain',
description:
'With list, output in an easy-to-parse format for scripts. This format will remain stable across Git versions and regardless of user configuration. See below for details'),
Option(
name: ['-v', '--verbose'],
description:
'With list, output additional information about worktrees (see below)'),
Option(
name: '--expire',
description:
'With list, annotate missing working trees as prunable if they are older than <time>',
args: [Arg(name: 'time')])
]),
Subcommand(
name: 'lock',
description:
'If a working tree is on a portable device or network share which is not always mounted, lock it to prevent its administrative files from being pruned automatically',
args: [
Arg(
name: 'worktree',
description:
'Working trees can be identified by path, either relative or absolute')
],
options: [
Option(
name: '--reason',
description:
'With lock or with add --lock, an explanation <reason> why the working tree is locked',
args: [Arg(name: 'reason')])
]),
Subcommand(
name: 'move',
description: 'Move a working tree to a new location',
args: [
Arg(
name: 'worktree',
description:
'Working trees can be identified by path, either relative or absolute'),
Arg(name: 'new-path', template: 'filepaths')
],
options: [
Option(
name: ['-f', '--force'],
description:
'Move refuses to move a locked working tree unless --force is specified twice. If the destination is already assigned to some other working tree but is missing (for instance, if <new-path> was deleted manually), then --force allows the move to proceed; use --force twice if the destination is locked')
]),
Subcommand(
name: 'prune',
description:
'Prune working tree information in \$GIT_DIR/worktrees',
options: [
Option(
name: ['-n', '--dry-run'],
description:
'With prune, do not remove anything; just report what it would remove'),
Option(
name: ['-v', '--verbose'],
description: 'With prune, report all removals'),
Option(
name: '--expire',
description:
'With prune, only expire unused working trees older than <time>',
args: [Arg(name: 'time')])
]),
Subcommand(
name: 'remove',
description: 'Remove a working tree',
args: [
Arg(
name: 'worktree',
description:
'Working trees can be identified by path, either relative or absolute')
],
options: [
Option(
name: ['-f', '--force'],
description:
'Remove refuses to remove an unclean working tree unless --force is used. To remove a locked working tree, specify --force twice')
]),
Subcommand(
name: 'repair',
description:
'Repair working tree administrative files, if possible, if they have become corrupted or outdated due to external factors',
args: [Arg(name: 'path', template: 'filepaths')]),
Subcommand(
name: 'unlock',
description:
'Unlock a working tree, allowing it to be pruned, moved or deleted',
args: [
Arg(
name: 'worktree',
description:
'Working trees can be identified by path, either relative or absolute')
])
]),
Subcommand(
name: 'apply',
description: 'Apply a patch to files and/or to the index',
options: [
Option(
name: '--exclude',
description: 'Don\'t apply changes matching the given path',
args: [Arg(name: 'path')]),
Option(
name: '--include',
description: 'Apply changes matching the given path',
args: [Arg(name: 'path')]),
Option(
name: '-p',
description:
'Remove <num> leading slashes from traditional diff paths',
args: [Arg(name: 'num')]),
Option(
name: '--no-add',
description: 'Ignore additions made by the patch'),
Option(
name: '--stat',
description:
'Instead of applying the patch, output diffstat for the input'),
Option(
name: '--numstat',
description:
'Show number of added and deleted lines in decimal notation'),
Option(
name: '--summary',
description:
'Instead of applying the patch, output a summary for the input'),
Option(
name: '--check',
description:
'Instead of applying the patch, see if the patch is applicable'),
Option(
name: '--index',
description:
'Make sure the patch is applicable to the current index'),
Option(
name: ['-N', '--intent-to-add'],
description: 'Mark new files with `git add --intent-to-add`'),
Option(
name: '--cached',
description: 'Apply a patch without touching the working tree'),
Option(
name: '--unsafe-paths',
description:
'Accept a patch that touches outside the working area'),
Option(
name: '--apply',
description:
'Also apply the patch (use with --stat/--summary/--check)'),
Option(
name: ['-3', '--3way'],
description:
'Attempt three-way merge if a patch does not apply'),
Option(
name: '--build-fake-ancestor',
description:
'Build a temporary index based on embedded index information',
args: [Arg(name: 'file')]),
Option(
name: '-z',
description: 'Paths are separated with NUL character'),
Option(
name: '-C',
description: 'Ensure at least <n> lines of context match',
args: [Arg(name: 'n')]),
Option(
name: '--whitespace',
description:
'Detect new or modified lines that have whitespace errors',
args: [
Arg(name: 'action', suggestions: [
FigSuggestion(
name: 'nowarn',
description:
'Turns off the trailing whitespace warning'),
FigSuggestion(
name: 'warn',
description:
'Outputs warnings for a few such errors, but applies the patch as-is (default)'),
FigSuggestion(
name: 'fix',
description:
'Outputs warnings for a few such errors, and applies the patch after fixing them'),
FigSuggestion(
name: 'error',
description:
'Outputs warnings for a few such errors, and refuses to apply the patch'),
FigSuggestion(
name: 'error-all',
description: 'Similar to `error` but shows all errors')
])
]),
Option(
name: ['--ignore-space-change', '--ignore-whitespace'],
description:
'Ignore changes in whitespace when finding context'),
Option(
name: ['-R', '--reverse'],
description: 'Apply the patch in reverse'),
Option(
name: '--unidiff-zero',
description: 'Don\'t expect at least one line of context'),
Option(
name: '--reject',
description:
'Leave the rejected hunks in corresponding *.rej files'),
Option(
name: '--allow-overlap',
description: 'Allow overlapping hunks'),
Option(name: ['-v', '--verbose'], description: 'Be verbose'),
Option(
name: '--inaccurate-eof',
description:
'Tolerate incorrectly detected missing new-line at the end of file'),
Option(
name: '--recount',
description:
'Do not trust the line counts in the hunk headers'),
Option(
name: '--directory',
description: 'Prepend <root> to all filenames',
args: [Arg(name: 'root')])
],
args: [
Arg(name: 'patch', isVariadic: true)
]),
Subcommand(
name: 'daemon',
description: 'A really simple server for Git repositories',
args: [
Arg(
name: 'directory',
description:
'A directory to add to the whitelist of allowed directories. Unless --strict-paths is specified this will also include subdirectories of each named directory',
isVariadic: true)
],
options: [
Option(
name: '--strict-paths',
description:
'Match paths exactly (i.e. don’t allow "/foo/repo" when the real path is "/foo/repo.git" or "/foo/repo/.git") and don’t do user-relative paths. git daemon will refuse to start when this option is enabled and no whitelist is specified'),
Option(
name: '--base-path',
description:
'Remap all the path requests as relative to the given path',
args: [Arg(name: 'path', template: 'folder')]),
Option(
name: '--base-path-relaxed',
description:
'If --base-path is enabled and repo lookup fails, with this option git daemon will attempt to lookup without prefixing the base path. This is useful for switching to --base-path usage, while still allowing the old paths'),
Option(
name: '--interpolated-path',
description:
'To support virtual hosting, an interpolated path template can be used to dynamically construct alternate paths. The template supports %H for the target hostname as supplied by the client but converted to all lowercase, %CH for the canonical hostname, %IP for the server’s IP address, %P for the port number, and %D for the absolute path of the named repository. After interpolation, the path is validated against the directory whitelist',
args: [Arg(name: 'path-templat')]),
Option(
name: '--export-all',
description:
'Allow pulling from all directories that look like Git repositories (have the objects and refs subdirectories), even if they do not have the git-daemon-export-ok file'),
Option(
name: '--inetd',
description: 'Have the server run as an inetd service',
exclusiveOn: ['--pid-file', '--user', '--group']),
Option(
name: '--listen',
description:
'Listen on a specific IP address or hostname. IP addresses can be either an IPv4 address or an IPv6 address if supported. If IPv6 is not supported, then --listen=hostname is also not supported and --listen must be given an IPv4 address. Can be given more than once. Incompatible with --inetd option',
args: [Arg(name: 'host_or_ipadd')]),
Option(
name: '--port',
description:
'Listen on an alternative port. Incompatible with --inetd option',
args: [Arg(name: 'por')]),
Option(
name: '--init-timeout',
description:
'Timeout (in seconds) between the moment the connection is established and the client request is received (typically a rather low value, since that should be basically immediate)',
args: [Arg(name: 'timeou')]),
Option(
name: '--max-connections',
description:
'Maximum number of concurrent clients, defaults to 32. Set it to zero for no limit',
args: [Arg(name: 'maximu')]),
Option(
name: '--syslog',
description: 'Short for --log-destination=syslog'),
Option(
name: '--log-destination',
description:
'Send log messages to the specified destination. Note that this option does not imply --verbose, thus by default only error conditions will be logged. The default destination is syslog if --inetd or --detach is specified, otherwise stderr',
args: [
Arg(name: 'destination', suggestions: [
FigSuggestion(
name: 'stderr',
description:
'Write to standard error. Note that if --detach is specified, the process disconnects from the real standard error, making this destination effectively equivalent to none'),
FigSuggestion(
name: 'syslog',
description:
'Write to syslog, using the git-daemon identifier'),
FigSuggestion(
name: 'none', description: 'Disable all logging')
])
]),
Option(
name: '--user-path',
description:
'Allow ~user notation to be used in requests. When specified with no parameter, requests to git://host/~alice/foo is taken as a request to access foo repository in the home directory of user alice. If --user-path=some-path is specified, the same request is taken as a request to access the some-path/foo repository in the home directory of user alice',
args: [Arg(name: 'path', template: 'folders')]),
Option(
name: '--verbose',
description:
'Log details about the incoming connections and requested files'),
Option(
name: '--detach',
description: 'Detach from the shell. Implies --syslog'),
Option(
name: '--pid-file',
description: 'Save the process id in the provided file',
args: [Arg(name: 'file', template: 'filepath')],
exclusiveOn: ['--inetd']),
Option(
name: '--user',
description:
'Change daemon’s uid and gid before entering the service loop. When only --user is given without --group, the primary group ID for the user is used. The values of the option are given to getpwnam(3) and getgrnam(3) and numeric IDs are not supported',
exclusiveOn: ['--inetd'],
args: [Arg(name: 'use')]),
Option(
name: '--group',
description:
'Change daemon’s gid before entering the service loop. The value of this option is given to getgrnam(3) and numeric IDs are not supported',
exclusiveOn: ['--inetd']),
Option(
name: '--enable',
description: 'Enable the service site-wide per default',
args: [Arg(name: 'service', suggestions: daemonServices)]),
Option(
name: '--disable',
description:
'Disable the service site-wide per default. Note that a service disabled site-wide can still be enabled per repository if it is marked overridable and the repository enables the service with a configuration item',
args: [Arg(name: 'service', suggestions: daemonServices)]),
Option(
name: '--allow-override',
description:
'Allow overriding the site-wide default with per repository configuration. By default, all the services may be overridden',
args: [Arg(name: 'service', suggestions: daemonServices)]),
Option(
name: '--forbid-override',
description:
'Forbid overriding the site-wide default with per repository configuration. By default, all the services may be overridden',
args: [Arg(name: 'service', suggestions: daemonServices)]),
Option(
name: '--informative-errors',
description:
'When informative errors are turned on, git-daemon will report more verbose errors to the client, differentiating conditions like "no such repository" from "repository not exported". This is more convenient for clients, but may leak information about the existence of unexported repositories. When informative errors are not enabled, all errors report "access denied" to the client',
exclusiveOn: ['--no-informative-errors']),
Option(
name: '--no-informative-errors',
description:
'Turn off informative errors. This option is the default. See --informative-errors for more information',
exclusiveOn: ['--informative-errors']),
Option(
name: '--access-hook',
description:
'Every time a client connects, first run an external command specified by the <path> with service name (e.g. "upload-pack"), path to the repository, hostname (%H), canonical hostname (%CH), IP address (%IP), and TCP port (%P) as its command-line arguments. The external command can decide to decline the service by exiting with a non-zero status (or to allow it by exiting with a zero status). It can also look at the \$REMOTE_ADDR and \$REMOTE_PORT environment variables to learn about the requestor when making this decision.\n\nThe external command can optionally write a single line to its standard output to be sent to the requestor as an error message when it declines the service',
args: [Arg(name: 'path', template: 'filepath')])
])
],
additionalSuggestions: [
FigSuggestion(
name: 'commit -m \'msg\'',
description: 'Git commit shortcut',
insertValue: 'commit -m \'{cursor}\'',
icon: 'fig://template?color=2ecc71&badge=🔥')
]);