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

gitlet-for-nodeos

v0.1.8

Published

Git implemented in JavaScript.

Downloads

6

Readme

Gitlet

Git implemented in JavaScript.

Over the last six years, I've become better at using Git for version control. But my conceptions of the index, the working copy, the object graph and remotes have just grown fuzzier.

Sometimes, I can only understand something by implementing it. So, I wrote Gitlet, my own version of Git. I pored over tutorials. I read articles about internals. I tried to understand how API commands work by reading the docs, then gave up and ran hundreds of experiments on repositories and rummaged throught the .git directory to figure out the results.

I discovered that, if approached from the inside out, Git is easy to understand. It is the product of simple ideas that, when combined, produce something very deep and beautiful.

Using Gitlet to understand Git

If you would like to understand what happens when you run the basic Git commands, you can read Git in six hundred words.

Afterwards, read the heavily annotated Gitlet source. 1000 lines of code sounds intimidating. But it's OK. The annotations explain both Git and the code in great detail. The code mirrors the terminology of the Git command line interface, so it should be approachable. And the implementation of the main Git commands is just 350 lines.

I wrote an article, Introducing Gitlet, about the process of writing the code.

Getting the code

Clone it from GitHub

$ git clone [email protected]:maryrosecook/gitlet.git

Or install it from npm.

$ npm install -g gitlet

Using Gitlet for version control

I wrote Gitlet to explain how Git works. It would be unwise to use Gitlet to version control your projects. But it does work. Sort of.

First, install Node.js. Then:

    $ npm install -g gitlet

    $ mkdir a
    $ cd a
./a $ gitlet init

./a $ echo first > number.txt
./a $ gitlet add number.txt
./a $ gitlet commit -m "first"
      [master 2912d7a2] first

./a $ cd ..
    $ gitlet clone a b

    $ cd b
./b $ echo second > number.txt
./b $ gitlet add number.txt
./b $ gitlet commit -m "second"
      [master 484de172] second

    $ cd ../a
./a $ gitlet remote add b ../b
./a $ gitlet fetch b master
      From ../b
      Count 6
      master -> b/master
./a $ gitlet merge FETCH_HEAD
      Fast-forward

./a $ gitlet branch other
./a $ gitlet checkout other
      Switched to branch other

./a $ echo third > number.txt
./a $ gitlet add number.txt
./a $ gitlet commit -m "third"
      [other 656b332d] third

./a $ gitlet push b other
      To ../b
      Count 9
      other -> other

Running the tests

Install Node.js.

$ git clone [email protected]:maryrosecook/gitlet.git
$ cd gitlet
$ npm install
$ npm test

Contact

Mary Rose Cook - http://maryrosecook.com I made this while working at Hacker School.