{"id":20435935,"url":"https://github.com/d4nyll/git-tt","last_synced_at":"2026-04-20T06:33:15.137Z","repository":{"id":42359202,"uuid":"153541620","full_name":"d4nyll/git-tt","owner":"d4nyll","description":"Super Easy™ time-travelling in Git","archived":false,"fork":false,"pushed_at":"2022-07-07T00:48:51.000Z","size":58,"stargazers_count":2,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T09:21:37.413Z","etag":null,"topics":["git","git-commit","git-extension"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/d4nyll.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}},"created_at":"2018-10-18T00:41:34.000Z","updated_at":"2023-03-10T09:27:04.000Z","dependencies_parsed_at":"2022-09-26T16:21:56.348Z","dependency_job_id":null,"html_url":"https://github.com/d4nyll/git-tt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fgit-tt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fgit-tt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fgit-tt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fgit-tt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d4nyll","download_url":"https://codeload.github.com/d4nyll/git-tt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241982490,"owners_count":20052529,"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","git-commit","git-extension"],"created_at":"2024-11-15T08:38:32.226Z","updated_at":"2026-04-20T06:33:10.105Z","avatar_url":"https://github.com/d4nyll.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `git tt`\n\n`git tt` (short for **t**ime **t**ravel) is a Git extension that makes it \u003ci\u003esuper easy\u003c/i\u003e™ for you to commit in the future or the past!\n\n```console\n$ git tt -m \"Commit in the past\" --date \"2 weeks ago\"\n$ git tt -m \"Commit in the future\" --date \"3 hours from now\"\n```\n\n## Installation\n\n`git tt` is written in [Node.js](https://nodejs.org/), and so you should have Node.js installed on your system. If you do not, I'd recommend installing [nvm](https://github.com/creationix/nvm) and then use it to install the latest version of Node.js.\n\n```console\n$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash\n$ source ~/.bashrc\n$ nvm install node\n```\n\nAfter Node.js is installed, install `git tt` globally it using npm.\n\n```console\n$ npm install --global @d4nyll/git-tt\n```\n\n## Usage\n\n`git tt` works in the exact same way as `git commit`, apart from the `--date` option, which differs in the following ways:\n\n* **Committer date** - In `git commit`, the `--date` option allows you to specify the _author date_, whilst with `git tt`, the `--date` specifies both the author date _and committer date_.\n* **Natural langauge processing (NLP)** - `git tt` uses [`chrono`](https://github.com/wanasit/chrono) to parse `--date`, which means you can use date strings like `\"yesterday at 20:43\"` or `\"30 minutes from now\"`, as well as the usual [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt), [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html), [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt), and other common formats\n* **Aliased** - `-d` has been added as an alias to `--date`\n\n\u003cpre\u003e\n$ date\nThu Oct 18 \u003cb\u003e00:46:47\u003c/b\u003e BST 2018\n$ git tt -m \"Commit in the future\" --date \u003cb\u003e\"2 hours from now\"\u003c/b\u003e\n[master 66b8b8d] Commit in the future\n 3 files changed, 50 insertions(+), 2 deletions(-)\n create mode 100644 README.md\n$ git show --quiet --format=fuller 66b8b8d\ncommit 66b8b8ddb394a66f9691d3736924f1a1e17ae816 (HEAD -\u003e master)\nAuthor:     Daniel Li \u003cdan@danyll.com\u003e\n\u003cb\u003eAuthorDate\u003c/b\u003e: Thu Oct 18 \u003cb\u003e02:46:47\u003c/b\u003e 2018 +0100\nCommit:     Daniel Li \u003cdan@danyll.com\u003e\n\u003cb\u003eCommitDate\u003c/b\u003e: Thu Oct 18 \u003cb\u003e02:46:47\u003c/b\u003e 2018 +0100\n\n    Commit in the future\n\u003c/pre\u003e\n\n### Examples\n\n```console\n$ git tt -m \"Commit in the present\" # Same as `git commit`\n$ git tt -m \"Commit in the past\" --date \"Thu Oct 18 2016 00:01:27 GMT+0100 (British Summer Time)\"\n$ git tt -m \"Commit in the future\" -d \"2022-05-13T23:57:37.566Z\"\n$ git tt -m \"Using relative time \" -d \"three weeks from now\"\n```\n\n\u003e Note on timezone - `git tt` uses your machine's local timezone (the same behavior as `git commit`). When time-travelling, `git tt` will use the timezone that would apply _at the time you're travelling to_. (Basically, you don't need to care about timezones)\n\n## Development\n\nTo develop `git tt`, make sure you have Node.js and the [yarn](https://yarnpkg.com/en/) package manager installed. Please use yarn as the primary lock file we use is `yarn.lock`.\n\nNext, clone the repository.\n\n```console\n$ cd ~/projects\n$ git clone git@github.com:d4nyll/git-tt.git\n```\n\nThen, every line of relevant code is defined in `cli.js`.\n\n### Testing\n\nI did not follow [test-driven development (TDD)](https://en.wikipedia.org/wiki/Test-driven_development) because I was initially just playing around, and was unsure about the interface that `git tt` should expose. I will continue to use `git tt` in my every day workflow to make sure it's user-friendly, fix any bugs, and once I am happy, the plan is to revisit this and write the unit tests.\n\nTo test it manually, run `npm link`, which will make the `git tt` command available on your shell. Once you've finished testing, run `npm unlink` to reset it.\n\n### Roadmap\n\nIf this tool becomes more popular, or if you'd like to contribute to new features, here are some of the features I have in mind (in order of importance):\n\n* Add fuzziness to the dates - if the user specifies a `--fuzzy` flag, add a few seconds/minutes in a random fashion so the dates are not so 'precise'. E.g. instead of `Thu Oct 25 12:00:00 2018 +0100`, make it `Thu Oct 25 12:03:56 2018 +0100`\n* Make error output more user-friendly, perhaps using [`chalk`](https://github.com/chalk/chalk)\n* Explore packaging project into stand-alone executable using [`pkg`](https://github.com/zeit/pkg)\n* Allow users to retrospectively modify the author and committer date of a commit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd4nyll%2Fgit-tt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd4nyll%2Fgit-tt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd4nyll%2Fgit-tt/lists"}