diff --git a/plugins/github/github-core/src/org/jetbrains/plugins/github/GHShareProjectUtil.kt b/plugins/github/github-core/src/org/jetbrains/plugins/github/GHShareProjectUtil.kt index 44cace538476..9047697455f9 100644 --- a/plugins/github/github-core/src/org/jetbrains/plugins/github/GHShareProjectUtil.kt +++ b/plugins/github/github-core/src/org/jetbrains/plugins/github/GHShareProjectUtil.kt @@ -76,9 +76,6 @@ object GHShareProjectUtil { root: VirtualFile, projectName: @NlsSafe String) { FileDocumentManager.getInstance().saveAllDocuments() - runWithModalProgressBlocking(project, IdeBundle.message("progress.saving.project", project.name)) { - saveSettings(project) - } val possibleRemotes = gitRepository ?.let(project.service()::findKnownRepositories) @@ -235,6 +232,12 @@ object GHShareProjectUtil { return true } + invokeAndWaitIfNeeded(indicator.modalityState) { + runWithModalProgressBlocking(project, IdeBundle.message("progress.saving.project", project.name)) { + saveSettings(project, forceSavingAllSettings = true) + } + } + LOG.info("Trying to commit") try { LOG.info("Adding files for commit")