Structure
GitCLI
A typed wrapper for ad hoc git CLI commands used by ShipItKit.
struct GitCLIOverview
Use this command family for git invocations that are not covered by the higher-level SwiftyShell Git workflows.
Topics
Initializers
init(context: ShellContext)Creates a
gitcommand family bound to a shell context.
Instance Properties
let arguments: [String]Arguments for the selected git subcommand.
let config: ToolConfigurationShared configuration applied to commands produced by this client.
var context: ShellContextThe shell context used when running this command family.
let globalArguments: [String]Global
gitarguments that must appear before the subcommand.let stderrDestination: OutputDestinationThe stderr handling strategy for built commands.
let stdoutDestination: OutputDestinationThe stdout handling strategy for built commands.
Instance Methods
func addAll() -> GitCLIUses the
git add -Acommand.func annotatedTag(name: String, message: String) -> GitCLIUses the
git tag -a <name> -m <message>command.func clone(url: String, into: String, depth: Int?) -> GitCLIUses the
git clonecommand.func command() -> CommandBuilds the raw
gitcommand.func commit(message: String) -> GitCLIUses the
git commit -m <message>command.func currentHEAD() -> GitCLIUses the
git rev-parse HEADcommand.func initializeRepository(at: String) -> GitCLIUses the
git init <path>command.func logOneline(limit: Int) -> GitCLIUses the
git log --oneline -<limit>command.func push(remote: String) -> GitCLIUses the
git push <remote>command.func pushSetUpstream(remote: String, branch: String) -> GitCLIUses the
git push -u <remote> <branch>command.func pushTags(remote: String) -> GitCLIUses the
git push <remote> --tagscommand.func repository(at: String) -> GitCLIAdds
-C <path>before the git subcommand.func revisionCount(String) -> GitCLIUses the
git rev-list --count <revision>command.func settingStderrDestination(OutputDestination) -> GitCLIRedirects stderr for the built
gitcommand.func settingStdoutDestination(OutputDestination) -> GitCLIRedirects stdout for the built
gitcommand.func statusPorcelain() -> GitCLIUses the
git status --porcelaincommand.func updatingConfiguration((ToolConfiguration) -> ToolConfiguration) -> GitCLIReturns a new value with updated shared tool configuration.
func version() -> GitCLIUses the
git --versioncommand.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatypeSwiftyShell.OutputRedirectingCommandFamilySwiftyShell.RunnableCommandFamilySwiftyShell.ToolConfigurableCommandFamily