diff --git a/src/plugins/git/branchview.cpp b/src/plugins/git/branchview.cpp index 01ff5ce8ac4..c99789a100a 100644 --- a/src/plugins/git/branchview.cpp +++ b/src/plugins/git/branchview.cpp @@ -236,7 +236,9 @@ void BranchView::slotCustomContextMenu(const QPoint &point) SetInContext block(m_blockRefresh); QMenu contextMenu; - contextMenu.addAction(Tr::tr("&Add..."), this, &BranchView::add); + if (isLocal) + contextMenu.addAction(Tr::tr("&Add..."), this, &BranchView::add); + const std::optional remote = m_model->remoteName(index); if (remote.has_value()) { contextMenu.addAction(Tr::tr("&Fetch"), this, [this, &remote] {