{"id":13629444,"url":"https://github.com/hazyuun/Chrono","last_synced_at":"2025-04-17T09:33:47.603Z","repository":{"id":57219886,"uuid":"527015333","full_name":"hazyuun/Chrono","owner":"hazyuun","description":"A git time machine, it automatically commits in a temporary branch every time a costumizable event occurs,  so that rolling-back to a specific point in time is always possible if anything goes wrong.","archived":false,"fork":false,"pushed_at":"2023-04-15T12:36:05.000Z","size":404,"stargazers_count":85,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2024-08-01T22:43:40.543Z","etag":null,"topics":["backup","git","go","golang","version-control"],"latest_commit_sha":null,"homepage":"","language":"Go","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/hazyuun.png","metadata":{"files":{"readme":"readme.md","changelog":null,"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-08-20T19:01:30.000Z","updated_at":"2024-01-30T06:46:47.000Z","dependencies_parsed_at":"2024-01-14T08:08:00.286Z","dependency_job_id":null,"html_url":"https://github.com/hazyuun/Chrono","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazyuun%2FChrono","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazyuun%2FChrono/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazyuun%2FChrono/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazyuun%2FChrono/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hazyuun","download_url":"https://codeload.github.com/hazyuun/Chrono/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223751124,"owners_count":17196574,"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":["backup","git","go","golang","version-control"],"created_at":"2024-08-01T22:01:10.971Z","updated_at":"2024-11-08T20:30:56.433Z","avatar_url":"https://github.com/hazyuun.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"assets/logo.png\" width=\"150\"/\u003e\n    \u003ch1\u003eChrono\u003c/h1\u003e\n    \u003cp\u003e\u003cstrong\u003eA Git Time Machine\u003c/strong\u003e\u003c/p\u003e    \n    \u003ca href=\"https://github.com/hazyuun/Chrono/actions/workflows/build.yml\"\u003e\n        \u003cimg alt=\"Build\" src=\"https://github.com/hazyuun/Chrono/actions/workflows/build.yml/badge.svg?branch=dev\" /\u003e\n    \u003c/a\u003e\n    \u003cimg alt=\"GitHub go.mod Go version\" src=\"https://img.shields.io/github/go-mod/go-version/hazyuun/Chrono?style=flat\"/\u003e\n    \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/hazyuun/Chrono?style=flat\u0026color=orange\"/\u003e\n\u003c/div\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n    Chrono \u003cstrong\u003eautomatically\u003c/strong\u003e commits in a temporary branch every time a \u003ci\u003ecostumizable\u003c/i\u003e event occurs.\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    So that you can always \u003cstrong\u003erollback\u003c/strong\u003e to a specific point in time if anything goes wrong.\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    You can \u003cstrong\u003esquash merge\u003c/strong\u003e all the temporary commits into one once you are done.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"assets/screenshot1.png\" width=\"550\"/\u003e\n\u003c/p\u003e\n\n---\n\n## Disclaimer\nThis is still in early development stages.\n\nIf you are going to use it or test it, ***please use with caution***.\n\nUse at your own risk, I am ***NOT*** responsible for any of your acts.\n\n\n## How to install\n\n```bash\ngit clone https://github.com/hazyuun/Chrono.git\ncd Chrono\ngo install .\n```\n\u003e Make sure you have `go` installed, if not, you can easily install it using your package manager\n\nThe binary will be installed into `~/go/bin/` by default, make sure it is in your `PATH` environment variable, if not, you can add it using:\n\n```bash\nexport PATH=\"$HOME/go/bin/:$PATH\"\n```\n\u003e Note that this will add `~/go/bin/` to `PATH` just for the current terminal session, you can add that line to your `~/.profile` for a permanent effect.\n\nNow you can run the following command to check if it is installed correctly:\n\n```bash\nchrono --help\n```\n\n## Workflow\n### Create a chrono session\n\nCreate a new session using:\n\n```bash\n$ chrono session create session_name\n```\n\u003cb\u003eImportant:\u003c/b\u003e Please note that this will create a branch from the current HEAD, so make sure it is currently in the commit where you want to create the chrono session.\n\nYou can create as many sessions as you want, to list existing sessions you can run the following command:\n\n```bash\n$ chrono session list\n```\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"assets/sessions_list.png\" width=\"500\"/\u003e\n\u003c/div\u003e\n\n### Start a Chrono session\nStart a Chrono session using:\n```bash\n$ chrono session start session_name\n```\nFrom now on, Chrono will be automatically committing changes to the session's specific branch whenever an event occurs.\n\n\u003e \u003cb\u003eImportant:\u003c/b\u003e Please note that after you stop running this command, you will still be in the session branch for convinience.\n\nEvents are customizable using a `chrono.yaml` file (see [below](#config-file) for details).\n\n---\n\n### Merging and deleting the session\n## Using chrono\nWhen done, you can merge the Chrono branch to your original branch\n```bash\n$ chrono session merge session_name \"Commit message\"\n```\n\nThen if everything is as expected, you can delete the session:\n```bash\n$ chrono session delete session_name\n```\n---\n## Manually\nYou can also merge manually (A squash merge is recommended) the Chrono branch to your original branch (let's call it original_branch):\n```bash\n$ git checkout original_branch\n$ git merge --squash chrono/session_name\n```\nThen if everything is as expected, you can commit the merge:\n```bash\n$ git commit -m \"Your commit message\"\n```\n...and delete the session:\n```bash\n$ chrono session delete session_name\n```\n---\n\n## Config file\nPut a file named `chrono.yml` in the root of your repository.\n\nHere is an example config file:\n```yaml\n\n# Events when to automatically commit\nevents:\n    # This triggers every amount of minutes\n    - periodic:\n\n        # Every 60 seconds\n        period: 60\n\n        # Commit those files\n        files: [\"src/\", \"file.txt\"] \n\n    # This triggers every file save\n    - save:\n\n        # Those files will be committed once they're saved\n        files: [\"notes.txt\"]\n        \n        # Use files: [\".\"] if you want all files inside the current directory to be commited (Not recursively, files inside subdirectories won't be committed)\ngit:\n    # When true, untracked files will automatically be added\n    auto-add: true\n```\n\nIf you want to exclude some files when using `files: [\".\"]`, just use your regular `.gitignore` file.\n\n---\n\n## Contributions\nPull requests and issues are welcome !\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazyuun%2FChrono","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhazyuun%2FChrono","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazyuun%2FChrono/lists"}