Git Legends Features – Backdate Git Commits, Branches & Merges

Git Legends comes packed with powerful features that make it the ultimate tool for manipulating Git history. It’s built for software developers, full-stack engineers, DevOps specialists, open-source maintainers, and any Git power-user who needs to simulate or fix repository timelines. This free, open-source CLI tool gives you a “time machine” for Git – enabling you to create commits, branches, and merges on specified past dates as if they actually happened back then. By seamlessly integrating with Git and GitHub, Git Legends ensures the backdated events look authentic in your repository. The result is a realistic Git history that tells the story you want, whether for demos, testing, or recovering lost progress, all while sounding highly technical yet casually developer-friendly in tone.

Below, we dive into each of these features in detail and how they can help you simulate historical commits, branches, and merges in your projects.

Key features at a glance:

  • Backdate repository creation: Initialize a repo and set its first commit in the past (e.g. last year) to make the project appear older.
  • Branch creation with past dates: Start new branches that seem to have been created on earlier dates, complete with an initial empty commit to mark the historical start.
  • Commits on specific dates: Make commits with custom timestamps (yesterday, last week, or years ago) to reconstruct a believable development timeline.
  • Automated PRs and merges: Open pull requests via GitHub’s API/CLI and merge them with backdated merge commits, simulating collaboration in a past timeframe.
  • One-command workflow: Run an entire feature development cycle (branch, multiple commits, PR, and merge) with a single command for convenience.
  • Custom authors & safety modes: Specify different commit authors to mimic team activity, and use dry-run modes to preview changes without risk.

Backdate Repository Creation

Ever wanted a Git repository to look like it started a year ago? Git Legends makes that easy. You can initialize a new Git repo as if it existed in the past. This feature lets you specify a date for the first commit during repo creation. For example, you could create a repository and set its initial commit timestamp to December 1, 2024 (or any date you choose). This initial commit will carry the custom date, instantly making the repo appear older on GitHub. Under the hood, Git Legends uses Git’s ability to accept custom commit dates (e.g. using git commit --date with the desired timestamp) to ensure the first commit’s date is exactly what you specify. The result is a repository whose history effectively begins on that past date, which is perfect for scenarios like back-filling a project that you forgot to put under version control or presenting a demo project with a lengthy history.

How it helps: Backdating a repository’s creation is useful for giving context to your project. If you’re an educator or speaker preparing examples, you can start a repo “last year” to show a long development cycle. For developers who want to migrate code and preserve original timelines, this feature lets you retain the original start date. By making the repository look mature, you add credibility and narrative to the codebase’s history.

$ legends init my-project --date 2024-12-01 --message "Initial commit"
# Creates a new repository called “my-project” with an initial commit dated Dec 1, 2024.
$ legends branch create feature-login --base main --date 2025-02-01
# Makes a new branch feature-login from main, and backdates the branch’s starting point to Feb 1, 2025.

Branch Creation with Past Dates

Git Legends allows you to create and backdate new Git branches, so they appear to have been started earlier than today. When you add a branch with a specified past date, the tool will insert an empty commit on that branch at the chosen timestamp. This empty commit (created with Git’s --allow-empty flag) acts as a “branch start” marker. In effect, the branch’s history begins on that past date. For example, suppose your main line of development started in January, but you want a feature branch that looks like it was spun off in March 2025 – Git Legends can create the branch and drop a placeholder commit in March 2025 as the branch’s first commit.

Once the branch exists with its backdated starting point, you can continue to add real commits to it (with their own dates) as needed. This feature is great for simulating long-running feature work or parallel development streams. Anyone examining the Git log will see that the branch diverged from main at the specified date, making your project timeline more convincing.

Use case: DevOps engineers often maintain long-lived feature branches or release branches. With Git Legends, you can recreate those scenarios for demonstration – for instance, showing a development branch that forked off main six months ago. It’s also handy if you forgot to create a branch earlier; you can retroactively create it and have the history reflect the correct branching point.

Commits on Specific Dates

This is the core capability of Git Legends – the power to make Git commits appear on any dates you want. Instead of all your commits showing the current date, you can instruct Git Legends to commit with a custom timestamp in the past. Simply supply a date (and optional time) for a commit, and Git Legends will ensure that the Git commit’s author and committer timestamps are set to that value. You can populate a branch with a series of backdated commits, whether they’re supposed to be spread over days, weeks, or months. Each commit can have a custom message and even a custom author identity.

For example, you might add one commit dated Feb 10, 2025 with the message “Implement login backend,” then another dated Feb 15, 2025 with “Add login UI.” By doing so, the commit history on that branch will show two commits in February 2025, even if you’re actually committing them now. This is perfect for reconstructing a development timeline – perhaps you’re filling in missing commits you forgot to push earlier, or you’re generating a realistic history for a sample project. Git’s normal behavior uses the current date for commits, but Git Legends automates the process of using environment variables (like GIT_AUTHOR_DATE and GIT_COMMITTER_DATE) so each commit you make through it will have the exact date you specify. The commits look natural, since everything from timestamps to author names can be tailored to your needs.

Why this matters: Being able to retroactively add commits on specific dates means you can tell a coherent story in your repository. Instead of a flurry of commits all on one day, you can space them out logically. This helps in presentations or tutorials, where a commit history that evolves over time is more instructive. It’s also useful if you’re trying to reconstruct lost work – you can add the code back in and set the commit date to when the work was originally done, so your Git history reflects reality.

$ legends commit --branch feature-login --date 2025-02-10 --message "Implement login backend"
$ legends commit --branch feature-login --date 2025-02-15 --message "Add login UI"
# Adds commits on specific past dates.
$ legends pr open --branch feature-login --base main \
--title "Feature: User Login" --body "Adds user login functionality."
$ legends pr merge --branch feature-login --date 2025-03-01 --delete-branch

Automated Pull Requests & Merges

Beyond commits and branches, Git Legends can simulate collaboration by automating pull requests (PRs) and merges. With a few commands, you can have the tool create a PR on GitHub and even merge it, all while keeping the Git commit history dates in the past. Here’s how it works:

  • Automated PR creation: Git Legends uses the GitHub CLI (or GitHub API) under the hood to open a pull request from your feature branch into the main branch. You can provide a PR title and description (for example, “Feature: User Login” with details) just as you would on GitHub’s website. The PR will be opened with those details, and it will list all the commits you made on the feature branch (which we backdated in the previous steps). Note that the PR’s opened date on GitHub will be the current real date (GitHub doesn’t allow fake creation times for PRs), but that’s generally fine – the commit history is the part that looks historical.
  • Backdated merges: After opening the PR, Git Legends can immediately merge it on your behalf. It performs a local merge of the feature branch into the main branch using a no-fast-forward merge commit (ensuring a merge node appears in history), and it sets a custom date for that merge commit as well. For instance, you could merge the PR and post-date the merge commit to March 1, 2025. The tool then pushes this merge commit to GitHub. On GitHub, the pull request will automatically be marked “Merged” (since the commits got integrated into main). The key is that the merge commit in the Git history will carry the March 1, 2025 timestamp, making it look like the feature was merged at that time. (The PR page will show “Merged on [today’s date]” because we actually performed the merge now, but anyone looking at the repository’s commit log will see the merge commit dated in 2025.)

Using Git Legends for PRs and merges is great for demonstrating team workflows. You can show a branch being reviewed and merged after some time gap. The tool even allows adding a PR comment or approval via the GitHub API to simulate code review (those actions will have real current dates, but they add realism to the scenario). After merging, Git Legends can delete the remote branch for cleanup, mimicking what a team might do after a successful feature merge.

Scenario: Imagine you’re showcasing how an open-source project accepts contributions. You could create a feature branch, backdate a couple of commits, open a PR, perhaps simulate a review comment like “Looks good,” and then merge it with a backdated commit. To viewers, the repository will have a commit history showing the feature branch activity and a merge commit at a past date, illustrating a collaborative development process over time.

One-Command Workflow (“Commit All”)

While each of the above features can be used step by step, Git Legends also offers a single-command automation to orchestrate an entire workflow from start to finish. The “commit all” (or workflow run) feature allows you to provide a set of parameters, then let Git Legends handle the rest of the sequence automatically. In one go, the tool will:

  • Create a new branch (if it doesn’t exist) at a specified past date. This uses the branch creation feature to establish the branch’s start point in history.
  • Add multiple commits on that branch at given dates with given messages. You can supply a list of commit dates and corresponding messages, and Git Legends will iterate through them, creating each commit in turn with the specified timestamp and message.
  • Push the branch and open a pull request on GitHub, with a title and body (either provided by you or auto-generated). This simulates the code being ready for review.
  • (Optional) Simulate a code review by adding a PR comment or an approval. If you enabled this, the CLI can post a “LGTM” comment or mark the PR as approved via the GitHub CLI – again, the timestamp of these will be now, but it adds to the narrative.
  • Merge the pull request into the main branch with a backdated merge commit. You specify the merge date, and Git Legends will perform the merge locally with that date, then push it and close the PR as merged. Optionally, it can delete the feature branch as a cleanup step.

All of these happen with a single command invocation, using parameters you’ve set. It’s a convenience feature for quickly generating a complete feature development cycle in your repository’s history without manual intervention at each step. You could script multiple such workflows to generate an entire project’s history (e.g., several feature branches over a year of timeline) in just a few minutes. This one-command approach is perfect for quickly populating a demo repository or testing environment with complex history, or for impressing your peers by showing an “instant” project history that looks like a team worked on it for months.

$ legends workflow run --feature feature-login \
--start-date 2025-02-01 \
--commit-dates "2025-02-10,2025-02-15" \
--messages "Implement login backend,Add login UI" \
--merge-date 2025-03-01
# Executes the entire flow automatically: branch, commit, PR, merge.

"By mixing author identities, the commit history and contribution graph can look like a real multi-developer project."

Customizable Author Details

Realistic history isn’t just about dates – it’s also about who made the commits. Git Legends allows you to specify custom author and committer details for each commit if needed. By default, it will use your global Git config’s name and email (or your GitHub identity when making PRs), but you can override this for any commit or series of commits. This means you can make it appear as if multiple developers were committing to the project. For instance, you could have some commits authored by “Alice alice@example.com” and others by “Bob bob@example.com”. Each commit’s metadata (author name/email and the date) can be tailored.

This feature is great for simulating a team environment or attributing past contributions to different people. Open-source developers might use this to credit contributions that were made outside Git, or to create a more believable scenario with multiple fictional contributors. In Git Legends commands, you’d simply provide flags for author name and email (or have different profiles) when making commits. The resulting Git log will show those names and emails exactly as provided, and GitHub will often link those to profiles or show the Gravatar, enhancing the realism.

By mixing author identities, the commit history and contribution graph can look like a real multi-developer project. Keep in mind, if you use an email that’s tied to a real GitHub account, the contributions might even count on that person’s profile (in the case of your own commits, it will count for you if you use your email). Git Legends gives you full control, but use this power responsibly – it’s best used for legit simulation and educational purposes, not to falsely attribute work to others.

Safety and Dry-Run Modes

While Git Legends is extremely powerful in rewriting history, it also includes safeguards so you don’t mess up an important repository by accident. Several safety features and a dry-run mode are provided:

Dry-run (preview) mode

You can run commands in a mode where no actual changes are made to your Git repo or to GitHub. The tool will output the sequence of actions it would take, allowing you to review the plan. This is useful to double-check that commit dates and messages are correct, or that you didn’t mistype a branch name, before anything is applied. It gives peace of mind, especially when working with an existing repository where you want to be careful.

Confirmation prompts

For potentially destructive actions (like overwriting an existing repository or force-pushing rewritten history), Git Legends can prompt you to confirm. It won’t delete or overwrite anything unless you explicitly allow it (or use a --force flag when you mean to). These checks ensure that using the tool on real projects doesn’t lead to accidental data loss.

Idempotent design

The CLI is designed so that if something goes wrong mid-process (like a network issue when pushing to GitHub), you can safely re-run the command once the issue is resolved. It will detect what steps are already completed (e.g., if the branch was created and some commits pushed, it won’t duplicate them) and resume as appropriate. This makes the automation robust – you won’t end up with duplicate commits or PRs.

Logs and transparency

Git Legends typically prints out each git command or GitHub API call it makes (or at least a summary of the action), so advanced users can see exactly what’s happening behind the scenes. This transparency is both educational and a safety feature, since you can spot if something looks off and cancel the process.

By providing these safety nets, Git Legends ensures you can experiment with backdating commits and crafting timelines without fear. You can confidently use it on test repositories or even live ones (for legitimate fixes) knowing that you have control over the process.

Friendly Command-Line Interface

Despite its powerful capabilities, Git Legends remains friendly and familiar to use. Its commands are modeled after Git and GitHub workflows, so developers will find the syntax intuitive. Here are a few examples of how you might use Git Legends in practice:

Each of these commands is designed to feel natural to a developer familiar with Git. The learning curve is minimal – you’re mostly adding legends in front of actions you already know (init, commit, branch, pr, etc.) and providing dates where needed. The CLI outputs clear information along the way, so you know what it’s doing (e.g., “Committing on branch feature-login with date 2025-02-10…”). And since Git Legends builds on top of Git and GitHub, you can always inspect the results with your normal tools (like running git log --graph --all to visualize the history, or checking the GitHub repository in your browser to see the timeline of commits and merges).

With these features, Git Legends gives you unprecedented control over your Git history. Whether you need to recreate a lost timeline, generate a realistic commit history for a demo, or simulate a year’s worth of collaboration in an afternoon, Git Legends has you covered. It focuses on flexibility and authenticity – all the timestamps and metadata are under your command, but the resulting history looks as if it naturally evolved over months of work.

Ready to make your Git history truly legendary? Head over to our How It Works section for a technical deep dive.

Git Legends empowers you to take control of Git history in a way that wasn’t easily possible before. Whether you’re a software engineer reconstructing lost commits, a DevOps engineer creating realistic test repositories, or an open-source developer presenting a project timeline, this tool gives you a friendly yet powerful interface to bend Git’s timeline to your will. And it does so using Git’s own mechanisms, so the end result is indistinguishable from a “natural” commit history. Give it a try, and craft your own legendary commit story!