diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index 8ce1b1938d330f20fc79d42a26f230e90f9ca923..6e442bec7f240e3a0f8a5f062cb7421d3d61aa6f 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -759,6 +759,7 @@ void GitPlugin::updateActions()
         m_statusProjectAction->setEnabled(false);
         m_logProjectAction->setParameter(repository);
         m_logProjectAction->setEnabled(false);
+        m_undoProjectAction->setEnabled(false);
         return;
     }
 
@@ -778,6 +779,7 @@ void GitPlugin::updateActions()
     m_statusProjectAction->setParameter(project);
     m_logProjectAction->setEnabled(enabled);
     m_logProjectAction->setParameter(project);
+    m_undoProjectAction->setEnabled(enabled);
 }
 
 void GitPlugin::showCommit()