mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-07-24 02:36:07 +10:00
fetch+pull
This commit is contained in:
8
docs/.obsidian/plugins/docs-viewer/main.js
vendored
8
docs/.obsidian/plugins/docs-viewer/main.js
vendored
@@ -154,6 +154,14 @@ class DocsViewerPlugin extends obsidian.Plugin {
|
||||
try {
|
||||
const vaultPath = this.app.vault.adapter.basePath;
|
||||
|
||||
// Fetch from remote
|
||||
new obsidian.Notice('Fetching latest changes...');
|
||||
await execPromise('git fetch', { cwd: vaultPath });
|
||||
|
||||
// Pull from remote
|
||||
new obsidian.Notice('Pulling latest changes...');
|
||||
await execPromise('git pull', { cwd: vaultPath });
|
||||
|
||||
// Add all changes
|
||||
await execPromise('git add .', { cwd: vaultPath });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user