auto add project files when init repository

This commit is contained in:
Roy Qu 2022-02-16 13:02:56 +08:00
parent a2289463f9
commit 480c3b9da5
1 changed files with 3 additions and 0 deletions

View File

@ -6614,6 +6614,9 @@ void MainWindow::on_actionGit_Create_Repository_triggered()
GitManager vcsManager;
vcsManager.createRepository(mProject->folder());
vcsManager.add(mProject->folder(), extractFileName(mProject->filename()));
foreach (PProjectUnit pUnit, mProject->units()) {
vcsManager.add(mProject->folder(),extractRelativePath(mProject->folder(),pUnit->fileName()));
}
//update project view
mProject->addUnit(includeTrailingPathDelimiter(mProject->folder())+".gitignore", mProject->rootNode(), true);
mProject->saveAll();