Skip to content

Jarvismkennedy/git-auto-sync.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Auto Sync

I wanted a way to automatically sync my Neorg notes between my desktop and my laptop, so I made this plugin. You can report bugs and I will try to fix them, or just copy the code. It is pretty simple.

Install

Install using your favourite package manager.

Lazy

return { 
 'Jarvismkennedy/git-auto-sync.nvim',
 opts = { 
  {
   "~/notes",
   auto_pull = false,
   auto_push = false,
   auto_commit = true,
   prompt = true,
   name = "notes"
  },
 },
 lazy = false,
}

Usage

The defaults are shown above. auto_pull will run git pull --rebase when the plugin is loaded. auto_commit/auto_push will commit/push on save. prompt will prompt you for a commit message.

If you need to manually sync the repo (like if you delete a file) you can run the user command :GitAutoSync which will prompt you for a repo to sync. Alternatively if you have set the name field you can run :GitAutoSync <name>. You can pause all functionality by running :GitAutoSync pause and you can resume it with :GitAutoSync resume

About

Auto syncing git repos.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages