diff --git a/SourceGit/UI/WorkingCopy.xaml b/SourceGit/UI/WorkingCopy.xaml
index d331c0c6..6d4b735d 100644
--- a/SourceGit/UI/WorkingCopy.xaml
+++ b/SourceGit/UI/WorkingCopy.xaml
@@ -368,7 +368,7 @@
-
+
diff --git a/SourceGit/UI/WorkingCopy.xaml.cs b/SourceGit/UI/WorkingCopy.xaml.cs
index 7b9ceaae..538e3da8 100644
--- a/SourceGit/UI/WorkingCopy.xaml.cs
+++ b/SourceGit/UI/WorkingCopy.xaml.cs
@@ -79,7 +79,7 @@ namespace SourceGit.UI {
Dispatcher.Invoke(() => {
var current = Repo.CurrentBranch();
- if (current != null && !string.IsNullOrEmpty(current.Upstream)) {
+ if (current != null && !string.IsNullOrEmpty(current.Upstream) && chkAmend.IsChecked != true) {
btnCommitAndPush.Visibility = Visibility.Visible;
} else {
btnCommitAndPush.Visibility = Visibility.Collapsed;
@@ -750,6 +750,18 @@ namespace SourceGit.UI {
}
txtCommitMsg.Text = commits[0].Subject;
+ btnCommitAndPush.Visibility = Visibility.Collapsed;
+ }
+
+ private void EndAmend(object sender, RoutedEventArgs e) {
+ if (!IsLoaded) return;
+
+ var current = Repo.CurrentBranch();
+ if (current != null && !string.IsNullOrEmpty(current.Upstream)) {
+ btnCommitAndPush.Visibility = Visibility.Visible;
+ } else {
+ btnCommitAndPush.Visibility = Visibility.Collapsed;
+ }
}
private async void Commit(object sender, RoutedEventArgs e) {