{"id":27010750,"url":"https://github.com/jkaraskiewicz/versions","last_synced_at":"2026-05-01T13:32:22.740Z","repository":{"id":285643011,"uuid":"953382542","full_name":"jkaraskiewicz/versions","owner":"jkaraskiewicz","description":"Simple module based version control system","archived":false,"fork":false,"pushed_at":"2025-04-10T19:31:57.000Z","size":1156,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T20:42:18.427Z","etag":null,"topics":["git","vcs","version-control","version-control-system","version-manager"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jkaraskiewicz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-03-23T08:25:07.000Z","updated_at":"2025-04-10T19:32:01.000Z","dependencies_parsed_at":"2025-04-01T22:37:20.773Z","dependency_job_id":"68147cb8-f814-4c74-a11f-89f16f43be7d","html_url":"https://github.com/jkaraskiewicz/versions","commit_stats":null,"previous_names":["jkaraskiewicz/versions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jkaraskiewicz/versions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkaraskiewicz%2Fversions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkaraskiewicz%2Fversions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkaraskiewicz%2Fversions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkaraskiewicz%2Fversions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkaraskiewicz","download_url":"https://codeload.github.com/jkaraskiewicz/versions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkaraskiewicz%2Fversions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32499681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","vcs","version-control","version-control-system","version-manager"],"created_at":"2025-04-04T11:27:16.746Z","updated_at":"2026-05-01T13:32:22.727Z","avatar_url":"https://github.com/jkaraskiewicz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003eversions\u003c/h1\u003e\n\u003ch2\u003eSimple module based version control system\u003c/h2\u003e\n\n## Introduction to _versions_\n\n_versions_ is a simple Version Control System (VCS) focused on maintaining multiple states (versions) of files within specific directories (modules). Unlike systems like Git, it does not operate on commits in the traditional sense and doesn't track granular changes *within* a single version. Instead, it manages distinct snapshots of a module's content.\n\n_versions_ uses two primary concepts: modules and versions. A module is directly linked to a single directory within your repository. Within each module, you can define multiple versions. Selecting a specific version changes the content of the module's directory to match that version's snapshot.\n\nTo begin using _versions_, you first need to initialize a repository in your desired location:\n\n```sh\n    $ versions init\n    \u003e Repository initialized successfully.\n```\n\nAfter initializing the repository, the next step is to define modules linked to your project directories. Let's create a couple of directories first:\n\n```sh\n    $ mkdir sample_dir\n    $ mkdir another_dir\n    $ versions module add sample_dir\n    \u003e Module sample_dir added.\n```\n\nYou can also assign a custom name to a module, distinct from its directory name, by providing two arguments to the `module add` command: the desired module name followed by the directory path.\n\n```sh\n    $ versions module add sample sample_dir\n    \u003e Module sample added.\n```\n\nWith the module added, let's select it. Selecting a module sets it as the current context, allowing you to work with its versions without needing to specify the module name in subsequent commands.\n\n```sh\n    $ versions module select sample\n    \u003e Module sample selected.\n```\n\nUpon adding a new module, `versions` automatically creates an initial `default` version for it. You can list the available versions within the currently selected module using:\n\n```sh\n    $ versions version list\n    \u003e default\n```\n\nNow, let's add some content to the `sample_dir` directory, which belongs to our selected `sample` module:\n\n```sh\n    $ echo \"First file!\" \u003e sample_dir/my_new_file.txt\n```\n\nTo see how the current directory content differs from the selected version's baseline, use the `status` command:\n\n```sh\n    $ versions version status\n    \u003e + sample_dir/my_new_file.txt\n      --- original\n      +++ modified\n      @@ -0,0 +1 @@\n      +First file!\n```\n\nExcellent. Since `versions` doesn't use explicit commits, the current state of the directory is implicitly tied to the selected version (`default` in this case). You don't need a separate 'commit' step; the changes are part of this version until you switch.\n\nLet's create a new version to capture a different state:\n\n```sh\n    $ versions version add new_version\n    \u003e Version new_version added.\n```\n\nSwitch to the newly created version:\n\n```sh\n    $ versions version select new_version\n    \u003e Version new_version selected.\n```\n\nSelecting a different version implicitly saves the current state of the working directory to the previously selected version (`default`).\nThe working directory is then updated to match the state of the newly selected version (`new_version`),\nwhich initially mirrors the state `default` was in when `new_version` was created.\n\nAnd our __new_version__ branches out from that state.\n\nWith new_version selected, let's modify the file:\n\n```sh\n    $ echo \"Some text\" \u003e\u003e sample_dir/my_new_file.txt\n```\n\nCheck the status again. The diff now compares the current state against the baseline of `new_version` (which included \"First file!\"):\n\n```sh\n    $ versions version status\n    \u003e sample_dir/my_new_file.txt \n      --- original\n      +++ modified\n      @@ -0,0 +1 @@\n      First file!\n      +Some text\n```\n\nGreat! Now, let's switch back to the `default` version:\n\n```sh\n    $ versions version select default.\n    \u003e Version default selected.\n```\n\nSimilar to the previous switch, the changes made while `new_version` was selected are now associated with `new_version`. The working directory (`sample_dir`) is restored to the state associated with the `default` version:\n\n```sh\n    $ cat sample_dir/my_new_file.txt\n    \u003e First file!\n```\n\nSo far, all operations have been within the `sample` module, which manages the `sample_dir` directory. Remember that modules are independent entities, each maintaining its own distinct set of versions.\n\nRecall that we created another directory, `another_dir`, earlier. Let's create and select a new module named `another` linked to this directory:\n\n```sh\n    $ versions module add another another_dir\n    \u003e Module another added.\n\n    $ versions module select another\n    \u003e Module another selected.\n```\n\nAs with the first module, creating the `another` module automatically generates a `default` version for it, which is now selected. You can manage versions for `another_dir` independently.\n\nFor a complete list of commands and options, use the `--help` flag:\n\n```sh\n    $ versions --help\n    \u003e Simple version control system\n    \u003e\n    \u003e Usage: versions \u003cCOMMAND\u003e\n    \u003e\n    \u003e Commands:\n    \u003e init         Initialize repository\n    \u003e module       Module commands\n    \u003e version      Version commands\n    \u003e show         Show repository state (modules, versions)\n    \u003e completions  Generate shell completions\n    \u003e help         Print this message or the help of the given subcommand(s)\n\n    \u003e Options:\n    \u003e -h, --help     Print help\n    \u003e -V, --version  Print version\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkaraskiewicz%2Fversions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkaraskiewicz%2Fversions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkaraskiewicz%2Fversions/lists"}