Skip to content

ruinivist/verti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

123 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verti - Versioned Artifacts

Verti demo

Usecase

Artifacts = notes, scratch code, documents etc. that are created as part of coding, research, learning etc.

Problem with the classic .gitignore

  • you don't get versioning for artifacts
  • if you switch branches and the .gitignore changes, you need to keep on updating it on every branch to exclude artifacts
  • footprint of "non project related" files in repo

There are ways around like using a submodule or linking to some folder outside but all of those leave reference commited in the repo.

How it works?

verti maintains a git like snapshot de-duplicated snapshot at ~/.verti per repo, post every commit. The files are ignored via addition to .git/info/exclude which verti manages for you, this leaves no references to the files themselves in the repo itself.

Install

  • AUR: yay -S verti

  • macOS: brew install ruinivist/tap/verti

  • Prebuilt: download a Linux/macOS tarball from GitHub Releases and put verti on your PATH.

  • Source:

    git clone https://github.com/ruinivist/verti.git
    cd verti
    make build

    Add ./build/verti to your PATH.

How to use?

Run inside a git repo:

verti init
verti add notes.md
verti add scratch/
git commit -m "work"

This'll ignore notes.md and anything under scratch/ folder but will keep versioning them aside.

Commands:

verti init             # create config and install hooks
verti add <path>       # track an artifact
verti rm <path>        # stop tracking an artifact
verti sync             # for restoring after a rollback ( this isn't automatically in case you want to don't rollback artifacts )
verti orphans          # in case a restore overwrites existing artifacts, an oprhan entrey is maintained
verti orphans <number> # restore orphaned snapshot by selecting item from `verti orphan`

What lives where

  • Config lives at .git/verti.toml.
  • Snapshots live under ~/.verti.
  • Artifacts are ignored through .git/info/exclude.

About

Versioned artifacts manager

Resources

License

Stars

Watchers

Forks

Packages