![]() |
VOOZH | about |
dotnet add package Aiursoft.GitRunner --version 10.0.25
NuGet\Install-Package Aiursoft.GitRunner -Version 10.0.25
<PackageReference Include="Aiursoft.GitRunner" Version="10.0.25" />
<PackageVersion Include="Aiursoft.GitRunner" Version="10.0.25" />Directory.Packages.props
<PackageReference Include="Aiursoft.GitRunner" />Project file
paket add Aiursoft.GitRunner --version 10.0.25
#r "nuget: Aiursoft.GitRunner, 10.0.25"
#:package Aiursoft.GitRunner@10.0.25
#addin nuget:?package=Aiursoft.GitRunner&version=10.0.25Install as a Cake Addin
#tool nuget:?package=Aiursoft.GitRunner&version=10.0.25Install as a Cake Tool
👁 MIT licensed
👁 NuGet version (Aiursoft.GitRunner)
GitRunner is a tool to help you run git commands in C#.
To install Aiursoft.GitRunner to your project from nuget.org:
dotnet add package Aiursoft.GitRunner
You can use this tool to Clone\Push\Commit git repositories.
var serviceProvider = new ServiceCollection()
.AddLogging()
.AddGitRunner()
.BuildServiceProvider();
var repoPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
Directory.CreateDirectory(repoPath);
var workspaceManager = serviceProvider.GetRequiredService<WorkspaceManager>();
await workspaceManager.Clone(
repoPath,
"master",
"https://gitlab.aiursoft.com/aiursoft/gitrunner.git",
mode);
var branch = await workspaceManager.GetBranch(repoPath); // master
var remote = await workspaceManager.GetRemoteUrl(repoPath); // https://gitlab.aiursoft.com/aiursoft/gitrunner.git
Below is a brief summary of all the methods available in WorkspaceManager:
GetBranch(string path)
var branch = await workspaceManager.GetBranch(path);GetCommitTimes(string path)
DateTime[]), in descending order.var times = await workspaceManager.GetCommitTimes(path);GetCommits(string path)
var commits = await workspaceManager.GetCommits(path);SwitchToBranch(string sourcePath, string targetBranch, bool enforceCurrentContent)
await workspaceManager.SwitchToBranch(sourcePath, "develop", true);GetRemoteUrl(string path)
var remoteUrl = await workspaceManager.GetRemoteUrl(path);Init(string path)
git init).await workspaceManager.Init(path);AddAndCommit(string path, string message)
await workspaceManager.AddAndCommit(path, "Initial commit");GetCurrentUserEmail(string path)
var email = await workspaceManager.GetCurrentUserEmail(path);Clone(string path, string? branch, string endPoint, CloneMode cloneMode)
await workspaceManager.Clone(path, "master", endpoint, CloneMode.Full);IsBareRepo(string path)
bool isBare = await workspaceManager.IsBareRepo(path);ResetRepo(string path, string? branch, string endPoint, CloneMode cloneMode)
await workspaceManager.ResetRepo(path, "master", endpoint, CloneMode.Full);CommitToBranch(string sourcePath, string message, string branch)
bool committed = await workspaceManager.CommitToBranch(sourcePath, "Update", "feature");SetUserConfig(string sourcePath, string username, string email)
await workspaceManager.SetUserConfig(sourcePath, "Your Name", "you@example.com");Push(string sourcePath, string branch, string endpoint, bool force = false)
await workspaceManager.Push(sourcePath, "master", endpoint, true);PendingCommit(string sourcePath)
bool hasPending = await workspaceManager.PendingCommit(sourcePath);Fetch(string path)
await workspaceManager.Fetch(path);Fetch method) to automatically retry operations on failure.There are many ways to contribute to the project: logging bugs, submitting pull requests, reporting issues, and creating suggestions.
Even if you with push rights on the repository, you should create a personal fork and create feature branches there when you need them. This keeps the main repository clean and your workflow cruft out of sight.
We're also interested in your feedback on the future of this project. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Aiursoft.GitRunner:
| Package | Downloads |
|---|---|
|
Aiursoft.NugetNinja.GitServerBase
Nuget package of 'GitServerBase' provided by Aiursoft |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.25 | 107 | 6/10/2026 |
| 10.0.24 | 100 | 6/10/2026 |
| 10.0.23 | 205 | 5/15/2026 |
| 10.0.22 | 116 | 5/15/2026 |
| 10.0.21 | 121 | 5/13/2026 |
| 10.0.20 | 165 | 4/22/2026 |
| 10.0.19 | 122 | 4/22/2026 |
| 10.0.18 | 147 | 4/15/2026 |
| 10.0.17 | 127 | 4/15/2026 |
| 10.0.16 | 150 | 4/6/2026 |
| 10.0.15 | 161 | 3/13/2026 |
| 10.0.14 | 134 | 3/13/2026 |
| 10.0.13 | 143 | 3/11/2026 |
| 10.0.12 | 147 | 3/10/2026 |
| 10.0.11 | 184 | 2/11/2026 |
| 10.0.10 | 150 | 2/11/2026 |
| 10.0.9 | 173 | 1/28/2026 |
| 10.0.8 | 158 | 1/18/2026 |
| 10.0.7 | 154 | 1/14/2026 |
| 10.0.6 | 152 | 1/14/2026 |