From 78fc438557a6d359ebcd2cf06cd4552b571f7df0 Mon Sep 17 00:00:00 2001 From: leo Date: Sat, 4 Jul 2020 17:25:55 +0800 Subject: [PATCH] Fetch all remotes after new remote was added --- Git/Remote.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Git/Remote.cs b/Git/Remote.cs index 4b411ff5..f7f4ccb2 100644 --- a/Git/Remote.cs +++ b/Git/Remote.cs @@ -54,7 +54,11 @@ namespace SourceGit.Git { /// public static void Add(Repository repo, string name, string url) { var errs = repo.RunCommand($"remote add {name} {url}", null); - if (errs != null) App.RaiseError(errs); + if (errs != null) { + App.RaiseError(errs); + } else { + repo.Fetch(null, true, null); + } } ///