diff --git a/src/Views/CreateBranch.axaml b/src/Views/CreateBranch.axaml index d8b89eb4..49bfda8d 100644 --- a/src/Views/CreateBranch.axaml +++ b/src/Views/CreateBranch.axaml @@ -70,7 +70,7 @@ Text="{DynamicResource Text.CreateBranch.LocalChanges}" IsVisible="{Binding !IsBareRepository}"/> - + - - - @@ -88,11 +88,11 @@ - - diff --git a/src/Views/RepositoryToolbar.axaml.cs b/src/Views/RepositoryToolbar.axaml.cs index aa78c4d3..66b49fc2 100644 --- a/src/Views/RepositoryToolbar.axaml.cs +++ b/src/Views/RepositoryToolbar.axaml.cs @@ -59,6 +59,12 @@ namespace SourceGit.Views var launcher = this.FindAncestorOfType(); if (launcher is not null && DataContext is ViewModels.Repository repo) { + if (repo.IsBare) + { + App.RaiseException(repo.FullPath, "Can't run `git pull` in bare repository!"); + return; + } + var startDirectly = launcher.HasKeyModifier(KeyModifiers.Control); launcher.ClearKeyModifier(); repo.Pull(startDirectly);