/* * Add a local repository to the git server */ private void MenuItemAddLocalRepo_Click(object sender, EventArgs e) { string res = DialogUtil.BrowseFolder("Select an existing repository to upload to the git server."); if (res == null) { return; } if (FileUtil.Exists(res)) { if (!FileUtil.Exists(res + @"\.git")) { DialogUtil.Message("Invalid Repository", "This directory is not initialized as a Git repository."); return; } ReposConfig cnf = ReposConfig.GetInstance(); string folderName = Path.GetFileName(res); cnf.AddRepoDetails(folderName, "", folderName, res, false); DialogUtil.Message("Repository Added", "Don't forget to set a remote server in the repository configuration."); EventManager.Fire(EventCode.REFRESH_REPOS); } }