mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-11-28 01:15:52 +11:00
fetch+pull
This commit is contained in:
1 parent
a2972caace
commit
4110d96265
1 file changed
+8
+8
@@ -154,6 +154,14 @@ class DocsViewerPlugin extends obsidian.Plugin {
|
|||||||
try {
|
try {
|
||||||
const vaultPath = this.app.vault.adapter.basePath;
|
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
|
// Add all changes
|
||||||
await execPromise('git add .', { cwd: vaultPath });
|
await execPromise('git add .', { cwd: vaultPath });
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user