Skip to content

akkki007/git-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📸 SnapIt

Version License Node.js

SnapIt is a lightweight, human-friendly version control system designed for simplicity and speed. It brings the power of snapshots to your projects without the complexity of traditional tools.


✨ Features

  • 🚀 Instant Snapshots: Quickly save the state of your project.
  • 🔍 Simple History: View your project's evolution with a clear, readable log.
  • ⏪ Easy Reverts: Accidentally broke something? Revert to any previous state in seconds.
  • 🛡️ Smart Ignoring: Keep your repository clean with .snapitignore support.
  • 🎨 Beautiful UI: Rich terminal interface with progress indicators and formatted tables.

🛠️ Installation

SnapIt is a Node.js-based CLI tool. To use it globally, you can link it locally or install dependencies and run it directly.

# Clone the repository
git clone https://github.com/yourusername/snapit.git

# Navigate to the directory
cd snapit

# Install dependencies
npm install

# (Optional) Link the command globally
npm link

🚀 Quick Start

Get up and running with SnapIt in three simple steps:

  1. Initialize your repository:

    snapit init
  2. Stage your changes:

    snapit add .
  3. Commit your snapshot:

    snapit commit "Initial snapshot of my project"

📖 Command Reference

Command Description Example
init Initialize a new SnapIt repository in the current directory. snapit init
add . Scan for changes and stage them for the next commit. snapit add .
commit Save the staged changes with a descriptive message. snapit commit "feat: add login ui"
log Display a detailed table of all snapshots in history. snapit log
revert Restore all project files to a specific snapshot hash. snapit revert a1b2c3d4
help Show the built-in help documentation. snapit help

⚙️ Configuration

.snapitignore

Create a .snapitignore file in your root directory to exclude specific files or folders from being tracked.

Note: SnapIt automatically ignores .snapit/, .snapitignore, node_modules/, and .git/ by default.

Example .snapitignore:

*.log
temp/
docs/drafts/
secret.txt

💡 Pro Tips

  • 🌟 Use snapit log to find the unique hash of any previous version.
  • 🌟 You don't need the full hash! You can use partial hashes (e.g., the first 8 characters) with the revert command.
  • 🌟 SnapIt's internals are inspired by Git. Your file contents are safely stored as objects in the .snapit/objects directory.

🧠 How It Works

SnapIt uses a content-addressable storage system located in the .snapit directory:

  • objects/: Stores compressed/hashed versions of your file contents.
  • commits/: Stores metadata for each snapshot (message, date, file references).
  • index.json: Tracks the current staged state of your repository.
  • HEAD: Points to the most recent snapshot.

📄 License

This project is licensed under the ISC License. See the package.json for details.


Made with ❤️ for developers who love simplicity.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages