{"id":15294746,"url":"https://github.com/dotindustries/ogre","last_synced_at":"2026-03-15T16:59:39.754Z","repository":{"id":37041643,"uuid":"466827621","full_name":"dotindustries/ogre","owner":"dotindustries","description":"Git-like repository for in-memory object versioning","archived":false,"fork":false,"pushed_at":"2025-03-29T08:26:32.000Z","size":2341,"stargazers_count":2,"open_issues_count":17,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-13T14:54:02.886Z","etag":null,"topics":["git","in-memory","typescript","versioning"],"latest_commit_sha":null,"homepage":"https://ogre.dot.industries","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotindustries.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-06T18:53:20.000Z","updated_at":"2025-03-29T08:26:35.000Z","dependencies_parsed_at":"2024-05-01T22:15:45.162Z","dependency_job_id":"03f4fd0e-440d-41d6-9700-e561d40859af","html_url":"https://github.com/dotindustries/ogre","commit_stats":{"total_commits":103,"total_committers":2,"mean_commits":51.5,"dds":0.06796116504854366,"last_synced_commit":"8d4a177e3b1714fb533da5c5c5758ec9c17f5e65"},"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotindustries%2Fogre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotindustries%2Fogre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotindustries%2Fogre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotindustries%2Fogre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotindustries","download_url":"https://codeload.github.com/dotindustries/ogre/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732512,"owners_count":21152851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","in-memory","typescript","versioning"],"created_at":"2024-09-30T17:06:34.107Z","updated_at":"2026-03-15T16:59:39.714Z","avatar_url":"https://github.com/dotindustries.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ogre\n\nAn in-memory git-like repository for objects for when you need to\nkeep the history around for a bit longer. The library uses json-patch RFC6902 for representing diffs.\n\n[![codecov](https://codecov.io/gh/dotindustries/ogre/branch/main/graph/badge.svg?token=23M014CWLK)](https://codecov.io/gh/dotindustries/ogre) [![Test coverage](https://github.com/dotindustries/ogre/actions/workflows/coverage.yml/badge.svg)](https://github.com/dotindustries/ogre/actions/workflows/coverage.yml)\n\n## Features\n\n- Commit\n- Branch\n- Tags\n- Checkout\n- Reset (soft and hard)\n- Diff\n- Status\n- Apply\n  \u003e ⚠️ Currently with a workaround to adapt for setting a value for an undefined prop `{prop: undefined}` will result in\n  the `compare` call as a `replace`\n  operation, but will be recorded by the observer as an `add` operation.\n  \u003e Applying a patch like that will result in internal retry with `add` instead of `replace`.\n  \u003e\n  \u003e See https://github.com/Starcounter-Jack/JSON-Patch/issues/280 for details\n- Visualization via `@dotinc/ogre-react`\n- Merge\n    - fast-forward\n\n## Usage\n\n```typescript\nconst repo = new Repository(new ComplexObject());\n\n// apply changes\nrepo.data.name = \"my name\";\nrepo.data.description = \"now we have a description\";\n\n// commit changes\nconst init = await repo.commit(\"initial commit\", \"author \u003cauthor@test.com\u003e\");\n// create a branch named savepoint pointing to the last commit\nrepo.createBranch(\"savepoint\");\n\n// switch to new branch\nrepo.checkout(\"add_details\", true);\n\n// apply changes\nrepo.data.name = \"a fancier name\";\n\n// a) commit \u0026 merge\nawait repo.commit(\"change name\", \"author \u003cauthor@test.com\u003e\");\nrepo.checkout(\"main\");\nrepo.merge(\"add_details\");\nrepo.tag(\"v1.0.0\");\n\n// or b) discard change and go back\n// by using the branch name\nrepo.checkout(\"main\");\n// by using the commit hash in a detached state\nrepo.checkout(init);\n```\n\n## TODO\n\n- [ ] Merge\n    - [ ] recursive\n    - [ ] octopus\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotindustries%2Fogre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotindustries%2Fogre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotindustries%2Fogre/lists"}