Skip to content

Commit 4110d96

Browse files
committed
fetch+pull
1 parent a2972ca commit 4110d96

File tree

1 file changed

+8
-0
lines changed
  • docs/.obsidian/plugins/docs-viewer

1 file changed

+8
-0
lines changed

docs/.obsidian/plugins/docs-viewer/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,14 @@ class DocsViewerPlugin extends obsidian.Plugin {
154154
try {
155155
const vaultPath = this.app.vault.adapter.basePath;
156156

157+
// Fetch from remote
158+
new obsidian.Notice('Fetching latest changes...');
159+
await execPromise('git fetch', { cwd: vaultPath });
160+
161+
// Pull from remote
162+
new obsidian.Notice('Pulling latest changes...');
163+
await execPromise('git pull', { cwd: vaultPath });
164+
157165
// Add all changes
158166
await execPromise('git add .', { cwd: vaultPath });
159167

0 commit comments

Comments
 (0)