Skip to content

Latest commit

a9a8346 · · Aug 24, 2026

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
Aug 24, 2026
Jul 23, 2026
Aug 24, 2026
Aug 17, 2026
Aug 18, 2026
Aug 23, 2026
Aug 23, 2026

Repository files navigation

Trail

A VCS (Version Control System) built on the same core principles as Git.


Core Features included:

  • Initialize a trail repository. Run trail init
  • Commit the project with a message. Run trail commit 'commit_description'
  • View Commit history. Run trail log --oneline
  • Revert back to any commit in history. Run trail revert 'commit_id'
  • Compresses the file contents before storing them
  • It hashes the content of each file and sets that hash as the title of that file after it is compressed.
  • Now, it also supports nested files and folders (stores history for all the nested files/folders).
  • Push your code to GitHub seamlessly.
  • Pull code from GitHub

How it works? Step-by-step workflow

  1. You run trail init, it initializes an empty trail repository.
  2. When you have completed a specific feature of your project, run trail commit 'commit_desc' to save a snapshot of current state of your project in history.
  3. Stores the current state of your project in .trail/history.json file.
  4. View commit history by trail log --oneline.
  5. If you want to go back to a specific commit in history, just run trail revert 'commit_id". (Get commit id by running 'trail log --oneline')
  6. Push code to GitHub using trail push owner/repo --token GITHUB-PAT --branch main
  7. Pull code from GitHub using trail pull owner/repo --token GITHUB-PAT --branch main

How to generate a GitHub Personal Access Token (PAT):

  1. Go to Settings > t; Developer Settings > t; Personal Access Tokens > t; Tokens (classic) (or Fine-grained tokens).
  2. Click Generate new token.
  3. Give your token a Note (description) and set an Expiration period.
  4. Select the required scope (repo)
  5. Click Generate token at the bottom.
  6. Copy and save your token immediately — GitHub will not show it to you again!

Where history is stored?

All the history of your project is stored in a .trail folder. The structure of .trail is:

my-project/
│
├── .trail/
│   ├── compressed/
│   └── history.json
│
├── file1.js
├── package.json
└── ...
─ ...

history.json stores metadata for every commit.

Each commit contains:

  • Commit ID
  • Commit message
  • Date
  • Mapping of project filenames to compressed file hashes
{
   "commitId": "...",
   "parentId": "...",
   "commitDesc": "Added authentication",
   "date": "...",
   "files": {
     "index.js": "af82bd73...",
     "src/app.js": "b17de09a..."
  }
}
}

About

A version control system.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published