# git-skew

> A tool for manipulating commit dates.

Latest version **1.0.2** (published 2023-05-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-skew
pnpm add git-skew
yarn add git-skew
bun add git-skew
```

Provides the command `git-skew`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-05-06 |
| First published | 2022-02-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 12.19.0 < 13 \|\| >= 14.10.0 |
| Dependencies | 3 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Joakim Hedlund |
| Maintainers | sleavely |
| Keywords | cli, git, commits, history, dates |

## Links

- npm: https://www.npmjs.com/package/git-skew
- Repository: https://github.com/Sleavely/git-skew
- Issues: https://github.com/Sleavely/git-skew/issues
- npm.io page: https://npm.io/package/git-skew

## Dependencies (3)

- [meow](https://npm.io/package/meow.md) ^9.0.0
- [dayjs](https://npm.io/package/dayjs.md) ^1.10.7
- [parse-duration](https://npm.io/package/parse-duration.md) ^1.0.2

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2023-05-06
- 1.0.1 — 2022-04-19
- 1.0.0 — 2022-02-11

## README

# git-skew

A tool for manipulating Git history by changing one or more commits' `GIT_AUTHOR_DATE` and `GIT_COMMITTER_DATE` either relative to itself or to a fixed point in time.

🕔⇆🕤

## Installation

```sh
npm install -g git-skew
```

## Usage

```
git-skew <commitOrRange> [--absolute <isoDate> | --relative[-reverse] <duration>] [--verbose] [--dry-run]

Options
  --absolute <isoDate>
      Absolute date to set the matching commits to in ISO8601 format.
  --relative <duration>
      Moves commits forward in time relative to the original commit date.
      Example: --relative 1d2h
  --relative-reverse <duration>
      Like --relative but moves backwards in time.
  --verbose
    Prints helpful information on what is happening.
  --dry-run
    Prints the things that would happen but does not modify the Git repository.
  --help
      Displays this message.
```

The `commitOrRange` argument follows the [semantics of Git Revision Selection](https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection), but must be quoted if it contains any spaces.


> ❗ We strongly advice that you always try your git-skew commands with the `--dry-run` flag to avoid accidentally changing the history of your entire repository.

### Single commit by hash

If you know the SHA1 of the commit - or at least the short version - and want to change its datetime to a known point in time.

```
git-skew 70bd49b --absolute 2025-01-01T12:00:00Z
```

### The latest commit

This will update a range of commits to have been committed 1 hour later. It targets everything _after_ `HEAD~1` up to, and _including_, `HEAD`.

```
git-skew HEAD~1..HEAD --relative 1h
```

### Commits made after a certain time

Targets the main branch, starting with commits made after 6pm.

```
git-skew 'main@{"Today 6pm"}..HEAD' --relative 1h
```

---
_Source: https://npm.io/package/git-skew · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
