diff --git a/Git/Project.cs b/Git/Project.cs index 08f6ed9..c439a11 100644 --- a/Git/Project.cs +++ b/Git/Project.cs @@ -23,7 +23,9 @@ public void Init(string repository) if (!Directory.Exists(GitPath)) { Directory.CreateDirectory(GitPath); - RunCommand($"clone --mirror {repository} ."); + RunCommand($"init"); + RunCommand($"remote add origin {repository}"); + RunCommand($"config remote.origin.fetch +refs/*:refs/*"); } } diff --git a/Program.cs b/Program.cs index 6410f1a..a337b27 100644 --- a/Program.cs +++ b/Program.cs @@ -128,6 +128,7 @@ static async Task AsyncMain(IConfigurationRoot config) if (mergeBranchTree == autoMergeTree) { Console.WriteLine("No changes to push into merge branch"); + git.Checkout(gitHubConfig["mergeBranch"]); } else {