8000 GitHub - siguici/gat: 🧭 Git Backdated - A CLI for Git-native operations with custom dates.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ gat Public

🧭 Git Backdated - A CLI for Git-native operations with custom dates.

License

Notifications You must be signed in to change notification settings

siguici/gat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ•°οΈ gat

Timetravel through your Git history Backdate your commits, merges, tags, cherry-picks and more β€” safely, consistently, and with style.


✨ Overview

🧭 gat is a flexible and extensible toolkit for applying custom dates to Git-native operations.

With full support for relative/absolute/human-friendly dates, seamless Git integration, and a clear modular structure, it lets you:

  • πŸ•³οΈ Write history like a time traveler
  • 🧽 Clean up messy timelines
  • πŸ“† Simulate workflows for testing, demos, and storytelling

⚑ Installation

One-liner via curl

curl -s https://raw.githubusercontent.com/siguici/gat/main/install.sh | bash

Installs gat into ~/.local/bin (or globally if run with sudo).

Manual Installation

git clone https://github.com/siguici/gat.git
cd gat
./install.sh

🧠 Philosophy

gat wraps your existing Git commands while allowing you to:

  • Specify the date in flexible formats
  • Use natural aliases (like yesterday, last week, -2d, +1d)
  • Apply dates to commits, merges, tags, cherry-picks, and more
  • Keep your current time (or override it)

No history rewriting. No rebase shenanigans. Just scoped, intentional backdating.


πŸ“¦ Command Syntax

gat <date> <git-subcommand> [options]

Example Usages

# Commit with ye
8000
sterday's date and current time
gat yesterday commit -am "Fix for Monday"

# Commit from 3 days ago
gat -3d commit -m "Old feature work"

# Merge a branch with custom date
gat 2024-03-21 merge feature-branch

# Tag with relative date
gat -1d tag v1.0.1 -m "Hotfix release"

# Cherry-pick a commit with date override
gat -2d cherry-pick abc123

πŸ—“οΈ Date Syntax

Format Meaning Examples
-1d, +3d Relative day offset -2d (2 days ago)
0 Today gat 0 commit ...
yesterday Shortcut for -1d gat yesterday ...
tomorrow Shortcut for +1d gat tomorrow ...
YYYY-MM-DD Absolute date gat 2023-12-31 ...
now Use current date & time gat now ...
--time Time override (HH:MM[:SS]) --time 14:30

🧠 Defaults

  • If no --time is passed: uses current time
  • All Git commands supported: commit, merge, tag, cherry-pick, etc.
  • Aliases auto-recognized: -1, -1d, yesterday are equivalent

βœ… Supported Git Commands

Command Description
commit Date-aware commit
merge Merge with custom date
tag Annotated tag with date
cherry-pick Cherry-pick commit with new date
revert Revert commit with specified date

πŸ› οΈ Core Options

Option Description
--time Set a custom time (e.g., --time 08:30)
--debug Show resolved date/time
--dry-run Print command but don’t execute
--no-color Disable colored output (CI-friendly)

πŸ“‚ Project Structure

gat/
β”œβ”€β”€ bin/
β”‚   β”œβ”€β”€ gat         # Git CLI interface
β”‚   └── utils.sh   # Shared shell logic
β”œβ”€β”€ install.sh      # One-liner installer
β”œβ”€β”€ tests/          # Integration tests
β”œβ”€β”€ README.md       # This file
└── LICENSE         # MIT License

πŸ“š Examples

Commit with absolute date

gat 2023-12-25 commit -am "πŸŽ„ Christmas commit"

Tag with yesterday alias

gat yesterday tag v1.2.3 -m "Hotfix pushed"

Merge with exact time

gat 2024-03-01 merge feature --no-ff --time 10:45

Preview command without running

gat -2d commit -am "Check this" --dry-run

πŸ”’ License

MIT License - Open source and free to use.
Crafted with care by @siguici


πŸ‘₯ Contributing

  • ⭐ Star the repo
  • πŸ› Report bugs
  • πŸ’‘ Suggest features
  • πŸ™Œ PRs welcome!

"History is written by the victors. Git history is written by you." β€” gat

About

🧭 Git Backdated - A CLI for Git-native operations with custom dates.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages

2940
0