Cloud-DevOps-Learning-Resources
This repo includes Books and imp notes related to GCP, Azure, AWS, Docker, K8s, and DevOps. More, exam and interview prep notes.
- 2.1k
- 2 y ago
A .NET library that unifies access to hosted Git providers behind a single abstraction.
Repo ktsu-dev/GitIntegration, read from GitHub 1 min ago. ktsu-dev has not joined Take My Repo.
ktsu-dev/GitIntegration is a public repo on GitHub by ktsu-dev. A .NET library that unifies access to hosted Git providers behind a single abstraction. It declares the MIT license on GitHub. It is written mainly in C#, has 1 stars and last changed on 2026-11-14. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-23.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
A .NET library that wraps the
gitbinary behind a fluent, strongly-typed interface, and unifies access to hosted Git providers behind a single abstraction.
ktsu.GitIntegration is a two-layer library. The local layer wraps the git executable found
on PATH behind a fluent, strongly-typed interface: open or discover a repository, then build and
run both read-only commands (status, log, diff, branches, remotes, rev-parse) and
mutating commands (init, clone, add, commit, branch creation and deletion, checkout,
remote management, and remote sync via fetch, pull, and push) without shelling out or
hand-parsing porcelain output yourself. The hosting layer — the original half of this library —
unifies access to hosted Git providers behind a GitProvider abstraction: GitHubProvider, built on
Octokit, and AzureDevOpsProvider, built on a raw HttpClient against Azure DevOps's REST API.
Both enumerate repositories and list and create pull requests through the same
IGitHostingProvider contract.
Every value that would otherwise be a bare string — a branch name, a commit SHA, a remote name, an
author email — is instead a validated semantic type built on ktsu.Semantics, so a GitBranchName
can no longer be accidentally passed where a GitCommitSha is expected.
Azure DevOps hosting deliberately does not use Microsoft.TeamFoundationServer.Client or the other
official TFS/Azure DevOps client package — both pull in System.Data.SqlClient, which carries a
known high-severity advisory, as a direct dependency of the published package. AzureDevOpsProvider
builds and parses its requests by hand instead.
IGitClient/GitClient finds and opens repositories — GetVersionAsync,
IsRepositoryAsync, OpenAsync, DiscoverAsync — and creates new ones — Init(...),
Clone(...) — by delegating every invocation to ktsu.RunCommand.GitRepository exposes one builder per read-only verb — Status(),
Log(), Diff(), Branches(), Tags(), Remotes(), Submodules(), Worktrees(),
RevParse(...), RevList(...), Divergence(...) — and one per mutating verb — Add(),
Commit(...), CreateBranch(...), DeleteBranch(...), CreateTag(...), DeleteTag(...),
Checkout(...), AddRemote(...), RemoveRemote(...), SetRemoteUrl(...), Fetch(), Pull(),
Push(), UpdateSubmodules(), AddWorktree(...), RemoveWorktree(...), PruneWorktrees() —
each configurable via chained method calls and run with ExecuteAsync or the non-throwing
TryExecuteAsync.Tags(), CreateTag(...), and DeleteTag(...) cover both lightweight
and annotated tags; Submodules() reports each submodule's recorded gitlink alongside what is
actually checked out, and UpdateSubmodules() checks the recorded commits out.Fetch() downloads objects and refs without touching the working tree,
Pull() fetches and integrates into the current branch, and Push() sends local commits —
fetch and push report a machine-readable, per-reference account of what happened via
GitFetchResult/GitPushResult, and a rejected push is the one place in this library where
ExecuteAsync and TryExecuteAsync diverge in more than exception-versus-result.GitStatus, GitCommit, GitBranch, GitRemote, GitDiffEntry,
GitVersion, GitInitResult, GitCompleted, GitFetchResult, GitPushResult, GitRefUpdate,
and GitWorktree records replace ad-hoc porcelain parsing with typed models — GitCompleted is
the shared result for mutating verbs whose only outcome is success.git -C <path> instead of a process
working directory, so a failing invocation's exact argument vector can be read off a
GitCommandException and rerun verbatim.GIT_TERMINAL_PROMPT=0 (no hanging credential
prompts) and LC_ALL=C (English, machine-stable output), which is what makes the output parsers
safe to write against fixed English text.AddGitIntegration() registers the client, process runner, and options
as singletons in one call. The hosting layer is constructed directly instead — see
Working with a Hosting Provider.IGitHostingProvider defines a common contract for enumerating
repositories, listing open pull requests, and creating a pull request —
GitHubProvider implements it on top of Octokit, AzureDevOpsProvider on a raw HttpClient
against Azure DevOps's REST API. GitHubProvider infers the owner's account type from
GET /users/{login} and routes automatically: an organisation's repositories come from
GET /orgs/{org}/repos, the credential's own account from GET /user/repos, and any other
owner from the public GET /users/{login}/repos route. An unauthenticated provider skips the
probe and calls the public route directly.GitHubDeviceFlow obtains a credential through GitHub's OAuth
device flow, split into two calls, RequestDeviceCodeAsync and WaitForTokenAsync, so a caller
can display the user code while the wait for authorisation runs.ktsu.CredentialCache, so credentials
come from the host's native keyring rather than configuration files. CredentialSource is the
escape hatch for a credential a keyring should not hold, such as a short-lived Entra ID access
token, and HostingCredential.FromBearerToken sends it as Authorization: Bearer rather than in
the personal-access-token slot.Install-Package ktsu.GitIntegrationdotnet add package ktsu.GitIntegration
<PackageReference Include="ktsu.GitIntegration" Version="x.y.z" />
Register the library with dependency injection, then resolve IGitClient:
using ktsu.GitIntegration; using Microsoft.Extensions.DependencyInjection; ServiceCollection services = new(); services.AddGitIntegration(); using ServiceProvider provider = services.BuildServiceProvider(); IGitClient client = provider.GetRequiredService<IGitClient>();
using ktsu.GitIntegration; using ktsu.Semantics.Paths; using ktsu.Semantics.Strings; AbsoluteDirectoryPath here = Environment.CurrentDirectory.As<AbsoluteDirectoryPath>(); GitRepository? repository = await client.DiscoverAsync(here); if (repository is not null) { GitStatus status = await repository.Status().ExecuteAsync(); Console.WriteLine(status.IsClean ? "Working tree is clean." : $"{status.Entries.Count} changed path(s) on {status.Branch?.WeakString}."); }
using ktsu.GitIntegration; using ktsu.Semantics.Strings; IReadOnlyList<GitCommit> commits = await repository.Log() .Take(10) .FirstParentOnly() .ExecuteAsync(); foreach (GitCommit commit in commits) { Console.WriteLine($"{commit.Sha.WeakString[..7]} {commit.Subject}"); } IReadOnlyList<GitDiffEntry> changes = await repository.Diff() .Staged() .DetectRenames() .ExecuteAsync();
using ktsu.GitIntegration; using ktsu.Semantics.Paths; using ktsu.Semantics.Strings; IReadOnlyList<GitWorktree> worktrees = await repository.Worktrees().ExecuteAsync(); GitBranchName branch = "feature/search".As<GitBranchName>(); if (!worktrees.Any(worktree => worktree.Branch == branch)) { AbsoluteDirectoryPath destination = "/repos/project-feature-search".As<AbsoluteDirectoryPath>(); await repository.AddWorktree(destination) .CreatingBranch(branch) .From("origin/main".As<GitRefName>()) .ExecuteAsync(); }
The main working tree reports IsMain, which is how a caller refuses to remove the one that owns
the repository. It is positional: git emits it first, rather than an attribute git labels.
using ktsu.CredentialCache; using ktsu.GitIntegration; using ktsu.Semantics.Strings; PersonaGUID persona = CredentialCache.CreatePersonaGUID(); GitHubDeviceFlow flow = new("Iv1.0123456789abcdef".As<GitHubOAuthClientId>(), ["repo", "read:org"]); GitHubDeviceCode code = await flow.RequestDeviceCodeAsync(); Console.WriteLine($"Open {code.VerificationUri} and enter {code.UserCode}"); HostingCredential credential = await flow.WaitForTokenAsync(code); CredentialCache.Instance.AddOrReplace(persona, new CredentialWithToken { Token = credential.Token!.As<CredentialToken>() });
The two calls are split so the user code can stay on screen for the minutes the wait may take. The flow stores nothing: where the credential lives is the caller's decision.
Init probes the target path before running git init, so GitInitResult.AlreadyExisted can tell
a caller whether a repository was already there — git init is idempotent and silently ignores
--initial-branch when re-initialising, so a caller that asked for a particular initial branch and
got AlreadyExisted == true did not get the branch it asked for:
using ktsu.GitIntegration; using ktsu.Semantics.Paths; using ktsu.Semantics.Strings; AbsoluteDirectoryPath target = Environment.CurrentDirectory.As<AbsoluteDirectoryPath>(); GitInitResult init = await client.Init(target) .WithInitialBranch("main".As<GitBranchName>()) .ExecuteAsync(); GitRepository repository = init.Repository;
Clone builds git clone. Its destination pre-check is advisory only — git enforces the same rule
itself, so the check exists solely to fail a doomed clone before it pays its network cost, and it is
deliberately racy:
using ktsu.GitIntegration; using ktsu.Semantics.Paths; using ktsu.Semantics.Strings; GitRepositoryRemotePath source = "https://github.com/ktsu-dev/GitIntegration.git".As<GitRepositoryRemotePath>(); AbsoluteDirectoryPath destination = Environment.CurrentDirectory.As<AbsoluteDirectoryPath>(); GitRepository cloned = await client.Clone(source, destination) .WithDepth(1) .ReportingProgress(new Progress<string>(line => Console.WriteLine(line))) .ExecuteAsync();
Commit runs git twice: git commit itself, then git log -1 with this library's pinned format,
because commit's own output is a human summary carrying only an abbreviated object id, with no
machine-readable alternative:
using ktsu.GitIntegration; using ktsu.Semantics.Strings; await repository.Add().All().ExecuteAsync(); GitCommit commit = await repository.Commit("Add feature X".As<GitCommitMessage>()) .WithBody("Longer explanation of the change.") .WithAuthor("Ada Lovelace".As<GitAuthorName>(), "ada@example.com".As<GitAuthorEmail>()) .ExecuteAsync(); Console.WriteLine(commit.Sha.WeakString);
Committing with nothing staged throws GitNothingToCommitException, a GitCommandException
specialization, rather than the generic base type — the one commit failure that is an ordinary
program state rather than a fault:
using ktsu.GitIntegration; using ktsu.Semantics.Strings; try { await repository.Commit("Nothing changed".As<GitCommitMessage>()).ExecuteAsync(); } catch (GitNothingToCommitException) { Console.WriteLine("Nothing was staged; skipping this commit."); }
using ktsu.GitIntegration; using ktsu.Semantics.Strings; await repository.CreateBranch("feature/new-thing".As<GitBranchName>()) .StartingAt("main".As<GitRefName>()) .ExecuteAsync(); await repository.Checkout("feature/new-thing".As<GitRefName>()).ExecuteAsync(); // Later, once the branch is no longer needed: await repository.DeleteBranch("feature/new-thing".As<GitBranchName>()) .Force() .ExecuteAsync();
Git has two kinds of tag, and GitTag describes both. A lightweight tag points straight at a
commit; an annotated tag points at a tag object carrying its own tagger, date, and message.
using ktsu.GitIntegration; using ktsu.Semantics.Strings; // Lightweight: just a reference. await repository.CreateTag("v1.2.3".As<GitTagName>()).ExecuteAsync(); // Annotated: the message is what makes it annotated, so the two are one call. await repository.CreateTag("v1.3.0".As<GitTagName>()) .Annotating("Release 1.3.0".As<GitCommitMessage>()) .At("main".As<GitRefName>()) .ExecuteAsync(); IReadOnlyList<GitTag> tags = await repository.Tags().ExecuteAsync(); foreach (GitTag tag in tags) { // Sha is the commit the tag ultimately names, dereferenced through the tag object where there // is one, so it is directly comparable with a GitBranch.Sha. ObjectSha is what the reference // itself points at, which differs only for an annotated tag. Console.WriteLine($"{tag.Name} -> {tag.Sha} ({(tag.IsAnnotated ? tag.Message : "lightweight")})"); } await repository.DeleteTag("v1.2.3".As<GitTagName>()).ExecuteAsync();
Submodules() reports what the superproject records alongside what is actually checked out. The
two disagree whenever someone has committed inside a submodule without updating the gitlink.
using ktsu.GitIntegration; IReadOnlyList<GitSubmodule> submodules = await repository.Submodules().ExecuteAsync(); foreach (GitSubmodule submodule in submodules) { Console.WriteLine($"{submodule.Path}: {submodule.State}"); if (submodule.State == GitSubmoduleState.DifferentCommit) { Console.WriteLine($" recorded {submodule.Sha}, checked out {submodule.CheckedOutSha}"); } } // Check out the recorded commits, initialising any submodule added upstream since this clone. await repository.UpdateSubmodules() .Initialize() .Recursive() .ExecuteAsync();
A failure here does not mean the repository is unchanged: the update walks the submodules in
turn, so one failing after others succeeded leaves a state that is neither the old nor the intended
new one. Ask Submodules() again to find out how far it got.
Before discarding a working copy, the question worth asking is whether it holds commits no remote has.
using ktsu.GitIntegration; IReadOnlyList<GitCommit> atRisk = await repository.Log() .IncludingAllRefs() .ExcludingRemoteTrackingRefs() .ExecuteAsync(); if (atRisk.Count > 0) { Console.WriteLine($"{atRisk.Count} commit(s) exist only here:"); foreach (GitCommit commit in atRisk) { Console.WriteLine($" {commit.Sha} {commit.Subject}"); } }
IncludingAllRefs() emits --all rather than the narrower --branches, which would miss a commit
on a detached HEAD — the normal state of a submodule working directory, and exactly the case where a
wrong answer costs work.
using ktsu.GitIntegration; using ktsu.Semantics.Strings; // One integer from git, rather than building a full GitCommit for every commit in the range. int behindMain = await repository.RevList("HEAD..main".As<GitRefName>()).ExecuteAsync(); // Ahead and behind for any two revisions, where GitStatus answers it only for HEAD against its // own configured upstream. GitDivergence divergence = await repository .Divergence("origin/main".As<GitRefName>(), "HEAD".As<GitRefName>()) .ExecuteAsync(); Console.WriteLine($"ahead {divergence.Ahead}, behind {divergence.Behind}");
using ktsu.GitIntegration; using ktsu.Semantics.Strings; IReadOnlyList<GitDiffEntry> entries = await repository.Diff() .Between("HEAD~1".As<GitRefName>(), "HEAD".As<GitRefName>()) .WithLineCounts() .ExecuteAsync(); foreach (GitDiffEntry entry in entries) { // Null rather than zero for a binary file: git declines to count one, and a binary change is // not a zero-line change. string counts = entry.Insertions is int added && entry.Deletions is int removed ? $"+{added} -{removed}" : "binary"; Console.WriteLine($"{entry.Kind} {entry.Path} {counts}"); }
using ktsu.GitIntegration; using ktsu.Semantics.Strings; GitRepositoryRemotePath url = "https://github.com/example/repo.git".As<GitRepositoryRemotePath>(); await repository.AddRemote("upstream".As<GitRemoteName>(), url) .WithFetch() .ExecuteAsync(); await repository.SetRemoteUrl("upstream".As<GitRemoteName>(), url) .ForPushOnly() .ExecuteAsync(); await repository.RemoveRemote("upstream".As<GitRemoteName>()).ExecuteAsync();
fetch --porcelain is only available from git 2.41 onward, so Fetch() probes the installed git's
version first. Below that threshold the fetch still runs and still succeeds, but
GitFetchResult.DetailAvailable is false and Updates is empty — check DetailAvailable before
trusting an empty Updates as "nothing changed":
using ktsu.GitIntegration; using ktsu.Semantics.Strings; GitFetchResult fetched = await repository.Fetch() .FromRemote("origin".As<GitRemoteName>()) .Prune() .WithTags() .ExecuteAsync(); if (fetched.DetailAvailable) { Console.WriteLine(fetched.IsUpToDate ? "Already up to date." : $"{fetched.Updates.Count} reference(s) updated."); } else { Console.WriteLine("Fetch completed, but this git is older than 2.41 so no per-reference detail is available."); }
Pull() returns GitCompleted rather than a parsed result, because everything git pull prints is
human prose with no porcelain form. Use Status() and Log() afterwards to learn what changed. A
conflict is the one outcome with its own exception, GitPullConflictException, because it leaves
the repository mid-merge or mid-rebase. Its Kind says which, and so whether merge --abort or
rebase --abort undoes it. A pull without Merge() or Rebase() follows pull.rebase, so the
caller may not have chosen:
using ktsu.GitIntegration; using ktsu.Semantics.Strings; try { await repository.Pull() .FromRemote("origin".As<GitRemoteName>()) .WithBranch("main".As<GitBranchName>()) .FastForwardOnly() .ExecuteAsync(); } catch (GitPullConflictException conflict) { GitStatus status = await repository.Status().ExecuteAsync(); IEnumerable<GitStatusEntry> unmerged = status.Entries.Where(e => e.IndexState == GitFileState.Unmerged); string next = conflict.Kind == GitPullConflictKind.Rebase ? "git rebase --continue" : "commit"; Console.WriteLine($"Pull left {unmerged.Count()} unmerged path(s); resolve them, then {next}."); }
FastForwardOnly() and Rebase() are mutually exclusive — combining them throws
InvalidOperationException when the argument vector is built, since they mean opposite things about
history.
ExecuteAsync and TryExecuteAsync Disagreepush is the one verb in this library where the two entry points mean genuinely different things,
not just exception-versus-result. A rejected push exits non-zero from git and prints a complete
porcelain record of every reference — git got far enough to talk about them and refused some. A
caller who does not know this will get it wrong by assuming TryExecuteAsync returning Success
means the push landed:
using ktsu.GitIntegration; using ktsu.Semantics.Strings; // ExecuteAsync stays strict: a rejection throws, and the exception carries the full parsed result. try { GitPushResult pushed = await repository.Push() .ToRemote("origin".As<GitRemoteName>()) .WithBranch("main".As<GitBranchName>()) .SettingUpstream() .ExecuteAsync(); } catch (GitPushRejectedException ex) { // ex.Result is the same GitPushResult a successful push would have returned. foreach (GitRefUpdate update in ex.Result!.Updates.Where(u => u.IsRejected)) { Console.WriteLine($"{update.Reference.WeakString}: {update.Summary}"); } }
TryExecuteAsync does not throw for a rejection — git ran and reported exactly what happened,
so that report comes back as a successful GitResult. Always check HasRejections, not just
Success:
using ktsu.GitIntegration; using ktsu.Semantics.Strings; GitResult<GitPushResult> result = await repository.Push() .ToRemote("origin".As<GitRemoteName>()) .WithBranch("main".As<GitBranchName>()) .TryExecuteAsync(); if (result.Success && result.Value!.HasRejections) { // This is still result.Success == true: TryExecuteAsync only fails when git never reached // the remote at all. A rejection is reported as data, not as GitResult failure. Console.WriteLine("Push ran but at least one reference was rejected — check result.Value.Updates."); }
ForceWithLease() wins over Force() when both are set, being the safer of the two — it refuses if
the remote moved since it was last fetched.
TryExecuteAsync reports a non-zero exit as a result instead of an exception — useful when "no such
revision" is an expected outcome rather than a failure:
using ktsu.GitIntegration; using ktsu.Semantics.Strings; GitResult<GitCommitSha> result = await repository .RevParse("maybe-missing-branch".As<GitRefName>()) .TryExecuteAsync(); if (result.Success) { Console.WriteLine(result.Value!.WeakString); } else { Console.WriteLine($"git exited {result.Error!.ExitCode}: {result.Error.StandardError}"); }
ExecuteAsync throws GitCommandException on a non-zero exit, carrying the exact argument vector
git was invoked with:
try { await repository.RevParse("no-such-ref".As<GitRefName>()).ExecuteAsync(); } catch (GitCommandException ex) { // ex.Arguments already begins with "-C <path>", so this can be pasted straight after `git` // on a command line to reproduce the failure exactly. Console.WriteLine("git " + string.Join(' ', ex.Arguments)); }
Providers are constructed directly rather than resolved from DI: GitHubProvider and
AzureDevOpsProvider need only a caller-supplied Owner (and, for Azure DevOps, an optional
Project), so there is nothing a container would meaningfully wire up.
using ktsu.GitIntegration; using ktsu.Semantics.Strings; IGitHostingProvider github = new GitHubProvider { Owner = "ktsu-dev".As<GitProviderOwner>(), }; // Credentials come from ktsu.CredentialCache, keyed by PersonaGUID — nothing to configure here // unless a specific persona is needed. IReadOnlyList<GitRepository> repositories = await github.GetRepositoriesAsync();
GitHubProvider.GetRepositoriesAsync routes by what Owner turns out to be. Authenticated, an
organisation's repositories come from GET /orgs/{org}/repos and the credential's own account from
GET /user/repos, so both include the private repositories the credential can see. Any other user
falls back to the public GET /users/{login}/repos route, which is all GitHub offers for that
case, and an unauthenticated provider always uses it. See GitHubProvider for
how the route is chosen. Azure DevOps returns everything the resolved credential can see.
using ktsu.GitIntegration; using ktsu.Semantics.Strings; IGitHostingProvider azure = new AzureDevOpsProvider { Owner = "my-org".As<GitProviderOwner>(), Project = "my-project".As<AzureDevOpsProjectName>(), }; IReadOnlyList<GitRepository> repositories = await azure.GetRepositoriesAsync();
PersonaGUID reads the host's native keyring, which suits a long-lived secret such as a personal
access token and suits nothing about a short-lived one. An Entra ID access token is minted per
session, expires within the hour, and authenticates against Azure DevOps only as
Authorization: Bearer — the Basic slot a personal access token travels in rejects it. Set
CredentialSource for that case:
using Azure.Core; using Azure.Identity; using ktsu.GitIntegration; using ktsu.Semantics.Strings; TokenCredential entra = new InteractiveBrowserCredential(); TokenRequestContext context = new(["499b84ac-1321-427f-aa17-267ca6975798/user_impersonation"]); IGitHostingProvider azure = new AzureDevOpsProvider { Owner = "my-org".As<GitProviderOwner>(), Project = "my-project".As<AzureDevOpsProjectName>(), CredentialSource = () => HostingCredential.FromBearerToken(entra.GetToken(context, default).Token), };
The callback runs on the request path and is consulted on every resolution, never cached, so a
caller can return a freshly refreshed token each time. It should return an already-valid cached
token rather than block on a network round trip — which is what TokenCredential.GetToken and its
equivalents already do. CredentialSource takes precedence over the credential cache when set, so
there is no need to also clear whatever the keyring holds for the persona. Return
HostingCredential.None to proceed unauthenticated.
HostingCredential.FromToken remains the right choice for a host-native token: Azure DevOps sends
it as Basic with an empty username, which is what its personal access tokens require, and GitHub
sends it under Octokit's Token scheme. FromBearerToken maps to Octokit's Bearer type on
GitHub, which is what a GitHub App installation token needs.
Project is only required for pull request operations — Azure DevOps has no project-less pull
request endpoint, and calling GetPullRequestsAsync or CreatePullRequest without it throws
InvalidOperationException immediately. GetPullRequestsAsync returns open pull requests
only, on both hosts:
using ktsu.GitIntegration; using ktsu.Semantics.Strings; GitRepositoryName repositoryName = "GitIntegration".As<GitRepositoryName>(); IReadOnlyList<GitPullRequest> openPullRequests = await azure.GetPullRequestsAsync(repositoryName); foreach (GitPullRequest pullRequest in openPullRequests) { Console.WriteLine($"#{pullRequest.Number.WeakString} {pullRequest.Title.WeakString} ({pullRequest.State})"); }
Creating a pull request goes through a builder, the same idiom as the local layer's mutating verbs:
using ktsu.GitIntegration; using ktsu.Semantics.Strings; GitPullRequest created = await azure.CreatePullRequest(repositoryName) .From("feature/new-thing".As<GitBranchName>()) .Into("main".As<GitBranchName>()) .Titled("Add feature X".As<GitPullRequestTitle>()) .Describing("Longer explanation of the change.") .ExecuteAsync(); Console.WriteLine(created.WebURI?.WeakString);
A hosting failure — authentication, not found, rate limiting, or anything else the host reports —
surfaces as a GitHostingException subtype carrying the provider name, HTTP status, and response
body, mirroring how GitCommandException carries the argument vector for the local layer:
try { await azure.CreatePullRequest(repositoryName) .From("feature/new-thing".As<GitBranchName>()) .Into("main".As<GitBranchName>()) .Titled("Add feature X".As<GitPullRequestTitle>()) .ExecuteAsync(); } catch (GitHostingAuthenticationException ex) { Console.WriteLine($"{ex.ProviderName} rejected the request: {ex.StatusCode}"); } catch (GitHostingRateLimitException ex) { Console.WriteLine($"Rate limited until {ex.ResetsAt}."); }
On GitHub, a token that is valid but not authorised for an organization's single sign-on raises
GitHostingAuthenticationException, and the exception's message carries the URL to authorise the
token at. GitHub answers such a request with a plain 403 that looks like a bad credential, and only
its X-GitHub-SSO header names the URL, so GitHubProvider copies the URL into the message. See
Single sign-on under GitHubProvider.
using ktsu.GitIntegration; using ktsu.Semantics.Strings; GitBranchName branch = "main".As<GitBranchName>(); GitRemoteName remote = "origin".As<GitRemoteName>(); GitCommitSha sha = "9fceb02d0ae598e95dc970b74767f19372d61af8".As<GitCommitSha>(); // These are distinct types — passing a GitBranchName where a GitCommitSha // is expected is a compile error, not a runtime surprise.
Every builder's BuildArguments() is a pure computation with no I/O, so the exact command can be
asserted or logged before it executes:
IReadOnlyList<string> arguments = repository.Status().BuildArguments(); // ["-C", "<path>", "--no-pager", "-c", "core.quotepath=false", "-c", "color.ui=false", // "status", "--porcelain=v2", "--branch", "-z"]
A GitRepository produced by a hosting provider (rather than IGitClient.OpenAsync or
DiscoverAsync) carries hosting metadata but neither a ProcessRunner nor a LocalPath — it
describes a repository that has never been cloned. Calling any verb on it throws
InvalidOperationException immediately, rather than failing later inside git:
GitRepository metadataOnly = new() { Name = "GitIntegration".As<GitRepositoryName>() }; // Throws InvalidOperationException — obtain a runnable repository from IGitClient first. _ = metadataOnly.Status();
Cloning one needs a destination, since there is no local path to infer:
IGitCloneBuilder clone = client.Clone( metadataOnly.RemotePath!, "/src/GitIntegration".As<AbsoluteDirectoryPath>()); GitRepository working = await clone.ExecuteAsync();
IGitClient / GitClientThe entry point to the local layer: finds and opens repositories, and reports on the git binary.
| Name | Return Type | Description |
|---|---|---|
GetVersionAsync(CancellationToken) |
Task<GitVersion> |
Reports the version of the git binary being invoked. |
IsRepositoryAsync(AbsoluteDirectoryPath, CancellationToken) |
Task<bool> |
Decides whether a path is inside a git working tree. Never throws for a non-repository path. |
OpenAsync(AbsoluteDirectoryPath, CancellationToken) |
Task<GitRepository> |
Opens the repository containing a path. Throws GitRepositoryNotFoundException when there is none, and GitCommandException carrying git's safe.directory advice when git refuses the repository as dubious ownership. |
DiscoverAsync(AbsoluteDirectoryPath, CancellationToken) |
Task<GitRepository?> |
Opens the repository containing a path, returning null instead of throwing when there is none. A repository git refuses as dubious ownership still throws GitCommandException, since it exists. |
Init(AbsoluteDirectoryPath) |
IGitInitBuilder |
Creates a repository at a path. Probes first, so the result's AlreadyExisted can tell a caller whether one was already there. |
Clone(GitRepositoryRemotePath, AbsoluteDirectoryPath) |
IGitCloneBuilder |
Clones a repository into a local working copy. |
Clone(GitRepository) |
IGitCloneBuilder |
Clones the repository a hosting provider described, using its RemotePath and intended LocalPath. |
Clone(GitRepository, AbsoluteDirectoryPath) |
IGitCloneBuilder |
Clones the repository a hosting provider described into the given destination. The result keeps its Name, HostRepositoryId and WebURI. |
GitRepositoryCarries an optional LocalPath plus optional hosting metadata, and exposes one builder factory per verb.
| Name | Type | Description |
|---|---|---|
LocalPath |
AbsoluteDirectoryPath? |
The working tree's local filesystem path; null on a repository a hosting provider enumerated, which has never been cloned. |
Name |
GitRepositoryName? |
The repository name, when known. |
HostRepositoryId |
GitHostRepositoryId? |
The host's own identifier, when known — what Azure DevOps's {repositoryId} path parameter is documented to take. |
WebURI |
GitRepositoryWebURI? |
The browser-facing URI, when known. |
RemotePath |
GitRepositoryRemotePath? |
The remote clone path, when known. |
ProcessRunner |
IGitProcessRunner? |
The runner this repository's verbs execute through; null on a metadata-only repository. |
| Name | Return Type | Description |
|---|---|---|
Status() |
IGitStatusBuilder |
Builds git status --porcelain=v2 --branch -z. |
Log() |
IGitLogBuilder |
Builds git log -z with this library's pinned format. |
Diff() |
IGitDiffBuilder |
Builds git diff --name-status -z. |
Branches() |
IGitBranchListBuilder |
Builds git for-each-ref over the branch namespaces. |
Tags() |
IGitTagListBuilder |
Builds git for-each-ref over refs/tags. |
Remotes() |
IGitRemoteListBuilder |
Builds git remote -v. |
Submodules() |
IGitSubmoduleListBuilder |
Reads git ls-files --stage -z for the recorded gitlinks and git submodule status for what is checked out. |
Worktrees() |
IGitWorktreeListBuilder |
Builds git worktree list --porcelain -z (without -z below git 2.36). |
RevParse(GitRefName) |
IGitRevParseBuilder |
Builds git rev-parse --verify for a revision, peeled to the commit it names. |
RevList(GitRefName) |
IGitRevListBuilder |
Builds git rev-list --count, counting commits without listing them. |
Divergence(GitRefName, GitRefName) |
IGitRevListDivergenceBuilder |
Builds git rev-list --count --left-right, reporting ahead and behind for any two revisions. |
Add() |
IGitAddBuilder |
Builds git add. |
Commit(GitCommitMessage) |
IGitCommitBuilder |
Builds git commit, then reads the new commit back with git log -1. |
CreateBranch(GitBranchName) |
IGitBranchCreateBuilder |
Builds git branch <name> [<start-point>]. |
DeleteBranch(GitBranchName) |
IGitBranchDeleteBuilder |
Builds git branch --delete <name>. |
CreateTag(GitTagName) |
IGitTagCreateBuilder |
Builds git tag, lightweight or annotated. |
DeleteTag(GitTagName) |
IGitTagDeleteBuilder |
Builds git tag --delete <name>. |
Checkout(GitRefName) |
IGitCheckoutBuilder |
Builds git checkout. |
AddRemote(GitRemoteName, GitRepositoryRemotePath) |
IGitRemoteAddBuilder |
Builds git remote add <name> <url>. |
RemoveRemote(GitRemoteName) |
IGitRemoteRemoveBuilder |
Builds git remote remove <name>. |
SetRemoteUrl(GitRemoteName, GitRepositoryRemotePath) |
IGitRemoteSetUrlBuilder |
Builds git remote set-url <name> <url>. |
Fetch() |
IGitFetchBuilder |
Builds git fetch, with --porcelain where the installed git supports it. |
Pull() |
IGitPullBuilder |
Builds git pull. |
Push() |
IGitPushBuilder |
Builds git push --porcelain. |
UpdateSubmodules() |
IGitSubmoduleUpdateBuilder |
Builds git submodule update. |
AddWorktree(AbsoluteDirectoryPath) |
IGitWorktreeAddBuilder |
Builds git worktree add. |
RemoveWorktree(AbsoluteDirectoryPath) |
IGitWorktreeRemoveBuilder |
Builds git worktree remove <path>. |
PruneWorktrees() |
IGitWorktreePruneBuilder |
Builds git worktree prune. |
IsClonedAsync(CancellationToken) |
Task<bool> |
Decides whether LocalPath currently holds a git working tree or a bare repository. |
OpenWebClient() |
void |
Opens WebURI in the default browser, when it is an absolute http/https URI. |
IGitCommandBuilder<TResult>The shared contract every verb builder implements. A builder is single-use and not thread-safe.
| Name | Return Type | Description |
|---|---|---|
BuildArguments() |
IReadOnlyList<string> |
The exact argument vector this builder will pass to git. Pure, no I/O. |
ExecuteAsync(CancellationToken) |
Task<TResult> |
Runs the command, throwing GitCommandException when git exits non-zero. |
TryExecuteAsync(CancellationToken) |
Task<GitResult<TResult>> |
Runs the command, reporting a non-zero exit as a result instead of throwing. |
| Interface | Extra Methods | Result |
|---|---|---|
IGitStatusBuilder |
WithUntrackedFiles(GitUntrackedFilesMode), IncludeIgnored() |
GitStatus |
IGitLogBuilder |
Take(int), Skip(int), ForRevision(GitRefName), ForPath(RelativeFilePath), FirstParentOnly(), IncludingAllRefs(), ExcludingRemoteTrackingRefs() |
IReadOnlyList<GitCommit> |
IGitDiffBuilder |
Staged(), Against(GitRefName), Between(GitRefName, GitRefName), DetectRenames(), DetectCopies(), ForPath(RelativeFilePath), WithLineCounts() |
IReadOnlyList<GitDiffEntry> |
IGitBranchListBuilder |
LocalOnly(), RemoteOnly() |
IReadOnlyList<GitBranch> |
IGitTagListBuilder |
(none) | IReadOnlyList<GitTag> |
IGitRemoteListBuilder |
(none) | IReadOnlyList<GitRemote> |
IGitSubmoduleListBuilder |
(none) | IReadOnlyList<GitSubmodule> |
IGitWorktreeListBuilder |
(none) | IReadOnlyList<GitWorktree> |
IGitRevParseBuilder |
(none — revision supplied via GitRepository.RevParse) |
GitCommitSha |
IGitRevListBuilder |
FirstParentOnly(), ForPath(RelativeFilePath) |
int |
IGitRevListDivergenceBuilder |
(none — revisions supplied via GitRepository.Divergence) |
GitDivergence |
IGitInitBuilder |
Bare(), WithInitialBranch(GitBranchName) |
GitInitResult |
IGitCloneBuilder |
WithBranch(GitBranchName), WithDepth(int), Bare(), RecursingSubmodules(), ReportingProgress(IProgress<string>) |
GitRepository |
IGitAddBuilder |
ForPath(RelativeFilePath), All(), UpdateTrackedOnly() |
GitCompleted |
IGitCommitBuilder |
WithBody(string), AllowEmpty(), StageTrackedFiles(), WithAuthor(GitAuthorName, GitAuthorEmail) |
GitCommit |
IGitBranchCreateBuilder |
StartingAt(GitRefName), Force() |
GitCompleted |
IGitBranchDeleteBuilder |
Force() |
GitCompleted |
IGitTagCreateBuilder |
At(GitRefName), Annotating(GitCommitMessage), Force() |
GitCompleted |
IGitTagDeleteBuilder |
(none) | GitCompleted |
IGitCheckoutBuilder |
CreatingBranch(), Force(), Detach(), RecursingSubmodules() |
GitCompleted |
IGitRemoteAddBuilder |
WithFetch() |
GitCompleted |
IGitRemoteRemoveBuilder |
(none) | GitCompleted |
IGitRemoteSetUrlBuilder |
ForPushOnly() |
GitCompleted |
IGitFetchBuilder |
FromRemote(GitRemoteName), AllRemotes(), Prune(), WithTags(), WithDepth(int), RecursingSubmodules(GitSubmoduleRecursion), ReportingProgress(IProgress<string>) |
GitFetchResult |
IGitPullBuilder |
FromRemote(GitRemoteName), WithBranch(GitBranchName), FastForwardOnly(), Rebase(), Merge(), Prune(), RecursingSubmodules(GitSubmoduleRecursion), ReportingProgress(IProgress<string>) |
GitCompleted |
IGitPushBuilder |
ToRemote(GitRemoteName), WithBranch(GitBranchName), SettingUpstream(), Force(), ForceWithLease(), DeletingRemoteBranch(), DryRun(), CheckingSubmodules(GitSubmodulePushCheck), ReportingProgress(IProgress<string>) |
GitPushResult |
IGitSubmoduleUpdateBuilder |
Initialize(), Recursive(), FromRemote(), Force(), WithDepth(int), ReportingProgress(IProgress<string>) |
GitCompleted |
IGitWorktreeAddBuilder |
CheckingOut(GitBranchName), CreatingBranch(GitBranchName), CreatingOrResettingBranch(GitBranchName), Detached(), From(GitRefName), Force(), WithoutCheckout() |
GitCompleted |
IGitWorktreeRemoveBuilder |
Force() |
GitCompleted |
IGitWorktreePruneBuilder |
(none) | GitCompleted |
| Type | Description |
|---|---|
GitOptions |
Configures the git executable path and a per-invocation timeout. |
IGitProcessRunner |
Runs the git executable with a given argument vector; implemented by RunCommandGitProcessRunner. |
GitResult<T> |
The outcome of a command run with TryExecuteAsync: either Value or Error, never both. |
GitCommandError |
The exit code, argument vector, and standard error of a failed invocation. |
| Type | Thrown When |
|---|---|
GitException |
Base type for every failure originating in this library. |
GitExecutableNotFoundException |
The git executable could not be started. |
GitTimeoutException |
Git did not complete within the configured GitOptions.Timeout. |
GitParseException |
Git succeeded but produced output the parser could not interpret. |
GitCommandException |
Git ran and exited non-zero. Carries ExitCode, Arguments, and StandardError. |
GitRepositoryNotFoundException |
A GitCommandException specialization: the path is not inside a git working tree or a bare repository. |
GitNothingToCommitException |
A GitCommandException specialization: git commit was run with nothing staged. The one commit failure that is an ordinary program state rather than a fault. |
GitPushRejectedException |
A GitCommandException specialization: git refused at least one reference during push. Carries the parsed Result (GitPushResult) so the rejection detail is not lost. |
GitPullConflictException |
A GitCommandException specialization: pull left conflicts in the working tree. Kind (GitPullConflictKind.Merge or Rebase) says whether the repository is mid-merge or mid-rebase. Use Status() to see which paths are unmerged. |
GitHostingException |
Base type for every hosting-layer failure. Does not derive from GitException — it carries HTTP concepts, not process ones. Carries ProviderName, StatusCode, ResponseBody. |
GitHostingAuthenticationException |
A GitHostingException specialization: the host rejected the request as unauthenticated, or the credential no longer grants access. |
GitHostingNotFoundException |
A GitHostingException specialization: the requested resource does not exist, or is not visible to the caller's credentials. |
GitHostingRateLimitException |
A GitHostingException specialization: the caller has exhausted its request quota. Carries ResetsAt, when the host reported one. |
GitHostingRequestException |
A GitHostingException specialization for any other non-success response — a malformed request, a validation failure, or a server-side error. |
| Type | Description |
|---|---|
GitStatus |
Branch, Upstream, Ahead, Behind, IsDetached, Entries, IsClean. |
GitStatusEntry |
IndexState, WorkTreeState, Path, OriginalPath, IsDirectory (an untracked or ignored directory git collapsed to one record) for one changed path. |
GitCommit |
Sha, TreeSha, ParentShas, Author, Committer, Subject, Body. |
GitSignature |
Name, Email, Timestamp recorded on a commit. |
GitBranch |
Name, Sha, Upstream, IsCurrent, IsRemote, IsUpstreamGone. |
GitRemote |
Name, FetchUrl, PushUrl (the first push URL), PushUrls (every push URL, in git's order). |
GitDiffEntry |
Kind, Path, OriginalPath, SimilarityPercent. |
GitWorktree |
Path, Head, Branch, IsMain, IsBare, IsDetached, IsLocked, LockReason, IsPrunable, PrunableReason for one working tree. IsMain is positional: true only for the first record git emits, since git's porcelain has no attribute for it. |
GitVersion |
Major, Minor, Patch, Raw, plus AtLeast(major, minor). |
GitFileState |
Enum: Unmodified, Modified, Added, Deleted, Renamed, Copied, Untracked, Ignored, Unmerged, TypeChanged. |
GitChangeKind |
Enum: Added, Copied, Deleted, Modified, Renamed, TypeChanged, Unmerged, Unknown. |
GitUntrackedFilesMode |
Enum: No, Normal, All. |
GitCompleted |
The result of a mutating verb whose only outcome is success — add, checkout, branch creation/deletion, remote commands, and pull. Carries Arguments. |
GitInitResult |
Repository, AlreadyExisted — the outcome of IGitClient.Init. |
GitFetchResult |
Updates, DetailAvailable, IsUpToDate — the outcome of Fetch(). IsUpToDate is gated on DetailAvailable so an empty Updates from a pre-2.41 git is never mistaken for "nothing changed". |
GitPushResult |
Updates, HasRejections — the outcome of Push(). |
GitRefUpdate |
Kind, Reference, Source, OldSha, NewSha, Summary, IsRejected — one reference changed by a fetch or a push. |
GitRefUpdateKind |
Enum: FastForward, Forced, Removed, Created, Rejected, UpToDate, TagUpdate, Unknown. |
GitPullRequest |
Number, Title, Description, SourceBranch, TargetBranch, Author, State, IsDraft, WebURI, CreatedAt — one pull request, as reported by a hosting provider. A null optional field means the host did not report that value. |
GitPullRequestState |
Enum: Open, Merged, Closed. |
IGitHostingProviderThe contract every hosting provider implements: repository enumeration, pull request listing, and pull request creation, over whichever transport and authentication scheme the host requires.
| Name | Type | Description |
|---|---|---|
Name |
GitProviderName |
Display name of the provider. |
Owner |
GitProviderOwner |
The owner of the repositories in this provider. |
PersonaGUID |
PersonaGUID |
The persona GUID used for authentication with the provider (from ktsu.CredentialCache). |
CredentialSource |
Func<HostingCredential>? |
Supplies the credential directly, bypassing the credential cache. Consulted on every resolution, so an expiring token can be refreshed. null to resolve through PersonaGUID. |
IsAuthenticated |
bool |
Whether requests this provider issues carry a credential. A cache entry that resolves to "proceed unauthenticated", and one of a type the provider cannot apply, both report false. |
| Name | Return Type | Description |
|---|---|---|
GetRepositoriesAsync(CancellationToken) |
Task<IReadOnlyList<GitRepository>> |
Retrieves the repositories Owner has, from the host. Coverage differs by host — see GitHubProvider and AzureDevOpsProvider below. |
GetPullRequestsAsync(GitRepositoryName, CancellationToken) |
Task<IReadOnlyList<GitPullRequest>> |
Retrieves a repository's open pull requests. The filter is requested explicitly of the host, not left to its default. |
CreatePullRequest(GitRepositoryName) |
IGitPullRequestCreateBuilder |
Starts building a pull request for a repository. |
GitProviderThe abstract base both hosting providers derive from. Implements IGitHostingProvider and resolves
credentials via TryGetCredential/ResolveCredential; each concrete provider builds its own
HttpClient-based transport around that credential — see GitHubProvider and AzureDevOpsProvider
below for how the two differ. public bool TryGetCredential(out Credential?) is declared here, not
on IGitHostingProvider, and reports only whether the credential cache holds an entry for this
provider's PersonaGUID. IsAuthenticated is the narrower question of whether a request would
actually carry one.
Each provider type keeps one shared SocketsHttpHandler for the life of the process and builds
a short-lived client or adapter over it per call, so a caller looping over many repositories reuses
one connection pool rather than building and tearing down one per request. Neither provider is
IDisposable, and neither ever disposes a handler injected for testing.
GitHubProviderGitProvider implementation backed by Octokit. GetRepositoriesAsync has no single endpoint that
both honours Owner and reveals the private repositories a credential can see, so it chooses a
route from what the owner turns out to be. An unauthenticated provider skips that check and calls
the public GET /users/{login}/repos route directly, since every route collapses to the same
public answer without a credential. Authenticated, the owner's type is read from
GET /users/{login} — deliberately not inferred from GET /orgs/{login}/repos answering 404,
because a token lacking read:org, or one an SSO-enforcing organisation has not authorised, is
answered 404 for an organisation that plainly exists, which would wrongly demote it to the
public-only route. An organisation then goes to GET /orgs/{org}/repos. A user owner costs one more
probe, GET /user, to establish whether the owner is the credential's own account: if it is,
GET /user/repos is used, since it always describes the token's own repositories regardless of
which owner was configured; otherwise, or when a GitHub App installation token's GET /user
answers 403, the enumeration falls back to the public GET /users/{login}/repos route.
A token that is valid but not authorised for an organization's single sign-on raises
GitHostingAuthenticationException carrying the URL to authorise it at. GitHub refuses such a
request with 403 and an X-GitHub-SSO: required; url=<uri> header. GitHubProvider reads the URL
from that header and appends it to the exception's message, after "Authorise it at:". A 403
without the header is still a GitHostingAuthenticationException, and its message is GitHub's own.
GitHubDeviceFlowObtains a GitHub credential through GitHub's OAuth device flow. The constructor takes a
GitHubOAuthClientId and the scopes to request. Split into two calls rather than one because the
pause between them is minutes long, and a caller displaying the user code needs to keep it on
screen while WaitForTokenAsync runs. Stores nothing: the caller decides where the resulting
credential lives.
| Name | Return Type | Description |
|---|---|---|
RequestDeviceCodeAsync(CancellationToken) |
Task<GitHubDeviceCode> |
Asks GitHub to begin a device flow. |
WaitForTokenAsync(GitHubDeviceCode, CancellationToken) |
Task<HostingCredential> |
Polls until the user authorises, the code expires, or cancellation, returning the issued credential. |
GitHubDeviceCode carries UserCode, DeviceCode, VerificationUri, ExpiresIn, and Interval.
UserCode is shown to the human at VerificationUri, and DeviceCode is sent in the poll instead.
The two are not interchangeable.
AzureDevOpsProviderGitProvider implementation built on a raw HttpClient against Azure DevOps's REST API
(api-version=7.1) — no Azure DevOps client library is referenced (see the Introduction).
GetPullRequestsAsync pages with $top and $skip until a short page comes back, so a repository
with more open pull requests than one page costs more than one request and is never truncated.
GetRepositoriesAsync issues exactly one request, because that endpoint documents no pagination.
| Name | Type | Description |
|---|---|---|
Project |
AzureDevOpsProjectName? |
Scopes repository enumeration to a project, or null to enumerate the whole organisation. Required for GetPullRequestsAsync and CreatePullRequest — Azure DevOps has no project-less pull request endpoint, and calling either without it throws InvalidOperationException. |
GetRepositoriesAsync returns everything the resolved credential can see — unlike
GitHubProvider, there is no public-only restriction.
IGitPullRequestCreateBuilderCollects a pull request's details before submitting it. From (or FromFork), Into, and
Titled are required; Describing and AsDraft are optional. A missing required value throws
InvalidOperationException from ExecuteAsync, not from the setter that left it unset, since
parts may be supplied in any order.
| Name | Return Type | Description |
|---|---|---|
From(GitBranchName) |
IGitPullRequestCreateBuilder |
Sets the source branch. |
FromFork(GitProviderOwner, GitBranchName) |
IGitPullRequestCreateBuilder |
Sets the source branch in another owner's fork. GitHub receives owner:branch as the head; Azure DevOps throws NotSupportedException from ExecuteAsync. |
Into(GitBranchName) |
IGitPullRequestCreateBuilder |
Sets the target branch. |
Titled(GitPullRequestTitle) |
IGitPullRequestCreateBuilder |
Sets the title. |
Describing(string) |
IGitPullRequestCreateBuilder |
Sets the description. |
AsDraft() |
IGitPullRequestCreateBuilder |
Marks the pull request as a draft. |
ExecuteAsync(CancellationToken) |
Task<GitPullRequest> |
Submits the pull request to the host. |
ServiceCollectionExtensions| Name | Return Type | Description |
|---|---|---|
AddGitIntegration(IServiceCollection) |
IServiceCollection |
Registers git integration with default options, invoking the git found on PATH. |
AddGitIntegration(IServiceCollection, Action<GitOptions>) |
IServiceCollection |
Registers git integration with configured options. Idempotent per service. |
Registers only the local layer. Hosting providers are constructed directly — see
Working with a Hosting Provider — since neither GitHubProvider
nor AzureDevOpsProvider has a constructor dependency a container could supply.
| Type | Wraps |
|---|---|
GitAuthorEmail |
Commit author or committer email address |
GitAuthorName |
Commit author or committer name |
GitBranchName |
Branch name |
GitCommitMessage |
Commit message |
GitCommitSha |
Commit object id (abbreviated or full, including SHA-256 repositories) |
GitHubOAuthClientId |
A GitHub OAuth App's client identifier, used to construct GitHubDeviceFlow |
GitProviderName |
Hosting provider display name |
GitProviderOwner |
Account or organization owning a repository |
GitRefName |
A branch, tag, SHA, or revision expression |
GitRemoteName |
Remote name |
GitRepositoryName |
Repository name |
GitRepositoryRemotePath |
Clone path or URL |
GitRepositoryWebURI |
Repository web address |
AzureDevOpsProjectName |
Azure DevOps project name — scopes AzureDevOpsProvider repository enumeration, and required for its pull request operations |
GitPullRequestNumber |
Pull request's host-assigned number |
GitPullRequestTitle |
Pull request title |
GitPullRequestAuthor |
Host's identifier for the account that opened a pull request (a GitHub login, or an Azure DevOps unique name) |
GitPullRequestWebURI |
Pull request web address |
Con
ktsu-dev/GitIntegration is a public repo on GitHub by ktsu-dev. A .NET library that unifies access to hosted Git providers behind a single abstraction.
It declares the MIT license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-11-14. GitHub counts 36 open issues and pull requests. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
This repo includes Books and imp notes related to GCP, Azure, AWS, Docker, K8s, and DevOps. More, exam and interview prep notes.

Reverse engineer anything with agents, from app behavior down to native binaries.
Light, fluffy, and always free - Local Azure Emulator
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

A comprehensive .NET library suite for building desktop applications with Dear ImGui.
A cross-platform credential cache for .NET that keeps secrets in memory for fast process-lifetime lookup and persists each one through the host's native keyring: Windows Credential Manager, macOS Keychain Services, or the freedesktop.org Secret Service on Linux.
A modern, extensible Text User Interface (TUI) library for .NET that provides rich terminal UI components built on Spectre.Console. Create interactive console applications with styled text, borders, layouts, and keyboard input handling using clean, object-oriented APIs.
A .NET library for persistent application data storage using JSON serialization. Provides a simple inherit-and-use pattern with automatic file management, thread-safe operations, debounced saves, backup recovery, and singleton access. Stores data in the user's app data folder with support for custom subdirectories and file names.

A flexible and extensible .NET library for representing code as language-agnostic Abstract Syntax Trees, serializing them to human-readable YAML for round-trip storage and version control, and generating source code in multiple target languages.
A command-line tool that finds and removes duplicate files recursively within a directory, keeping the copy with the shortest filename. Computes SHA256 hashes in parallel to group files by content, and offers scan, dry-run, statistics, and interactive deduplication commands so nothing is deleted without confirmation.
This page is also available as structured data, with the same sources and dates.
/api/v1/resources/gh/ktsu-dev/GitIntegrationTake My Repo has not tested this on your machine. Requirements come from the project's own documentation.