npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pit-vcs

v1.0.2

Published

A lightweight version control system inspired by Git.

Downloads

181

Readme

Pit - A Lightweight Version Control System 🚀

Pit is a simple version control system inspired by Git. It lets you track changes, commit updates, and view the history of your project. Perfect for learning how version control works or managing simple projects without the complexity of Git.


✨ Features

  • 🏁 Initialize a Repository: Create a .pit directory to track files.
  • 📂 Staging Area: Add files to a staging area before committing.
  • 💾 Commit Changes: Save the state of your files with a message.
  • 📜 View History: View a log of all commits.
  • 🔍 Show Differences: View file changes between commits.

🔧 Installation

Using npm (Recommended)

Install Pit globally using npm:

npm install -g pit

Clone from GitHub

Alternatively, clone the repository and link it globally:

git clone https://github.com/your-username/pit.git
cd pit
npm install
npm link

🚀 Usage

Pit provides a set of commands to manage your repository:

1. Initialize a Repository

Create a .pit directory in your project:

pit init

2. Add Files to Staging

Add files to the staging area:

pit add <file>

Example:

pit add sample.txt

3. Commit Changes

Save the state of your files with a message:

pit commit "<message>"

Example:

pit commit "Initial commit"

4. View Commit History

Display the log of all commits:

pit log

5. Show Differences

View file changes in a specific commit:

pit show <commitHash>

📖 Example Workflow

# Initialize a repository
pit init

# Add a file
pit add file.txt

# Commit changes
pit commit "Add file.txt"

# View commit history
pit log

# Show changes in a commit
pit show <commitHash>

⚙️ How It Works

  • .pit Directory: All tracked files, commits, and metadata are stored in a .pit directory at the project root.
  • Staging Area: Changes are staged in an index file within .pit before committing.
  • Commits: Each commit is stored as a file in .pit/objects with metadata, a message, and file contents.

🛠 Development

Prerequisites

Install Dependencies

Run the following to install dependencies:

npm install

Run Locally

Test commands directly using:

node index.js <command>

🤝 Contributing

Contributions are welcome! Follow these steps to contribute:

  1. Fork this repository.
  2. Create a branch (`git checkout -b feature/my-feature`).
  3. Commit your changes (`git commit -m "Add feature"`).
  4. Push to your branch (`git push origin feature/my-feature`).
  5. Create a Pull Request.

📜 License

This project is licensed under the MIT License.


🙏 Acknowledgements


📞 Contact

For questions or support, feel free to reach out: