Skip to content

iamjinlei/gitfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

gitfs

GitFs provides you an alternative persistent storage solution for keeping metadata. This is ideal for quick prototyping. GitFs has a choice of memfs or OS file system as a local storage, which is backed by remote git repo. When syncing local data, it has an option to wipe out git history to boost sync efficiency.

c := gitfs.NewConfig().SetUrl(repoUrl).UseMemFs()
fs, _ := gitfs.New(context.TODO(), c)

f, _ := fs.Create("test.txt")
f.Write([]byte("test"))
f.Close()

fs.Sync(true)

Limitation: src-d has no support for git merge yet. It could fail to sync if remote repo is diverged.

example

go run example/run.go

About

Local filesystem (memfs or os fs) backed by remote git repo

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages