feat: purge local repo action for git module
This commit is contained in:
parent
b1c7edac90
commit
e68932aa40
@ -109,3 +109,6 @@ actions:
|
|||||||
- handler: importAll
|
- handler: importAll
|
||||||
label: Import Everything
|
label: Import Everything
|
||||||
hint: Will import all content currently in the local Git repository, regardless of the latest commit state. Useful for importing content from the remote repository created before git was enabled.
|
hint: Will import all content currently in the local Git repository, regardless of the latest commit state. Useful for importing content from the remote repository created before git was enabled.
|
||||||
|
- handler: purge
|
||||||
|
label: Purge Local Repository
|
||||||
|
hint: If you have unrelated merge histories, clearing the local repository can resolve this issue. This will not affect the remote repository or perform any commit.
|
||||||
|
@ -443,5 +443,11 @@ module.exports = {
|
|||||||
|
|
||||||
await this.git.commit(`docs: add all untracked content`)
|
await this.git.commit(`docs: add all untracked content`)
|
||||||
WIKI.logger.info('(STORAGE/GIT) All content is now tracked.')
|
WIKI.logger.info('(STORAGE/GIT) All content is now tracked.')
|
||||||
|
},
|
||||||
|
async purge() {
|
||||||
|
WIKI.logger.info(`(STORAGE/GIT) Purging local repository...`)
|
||||||
|
await fs.emptyDir(this.repoPath)
|
||||||
|
WIKI.logger.info('(STORAGE/GIT) Local repository is now empty. Reinitializing...')
|
||||||
|
await this.init()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user