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

thegit

v1.0.1

Published

Implementation of git in node.js.

Downloads

15

Readme

Introduction

Features

The followings are implemented in leGit and work similarly as in git, with the options supported in square brackets

  • [x] legit init
  • [x] legit add [-A, file list]
  • [x] legit commit [-m, edit message using editor]
  • [x] legit log
  • [x] legit branch [branch name to create, no arguments to list branchces]
  • [x] legit checkout [-b, commit hash, branch name]
  • [x] legit reset [commit hash]
  • [x] legit status
  • [x] legit merge

Differences from git

While these commands work similarly there are a few differences to note:

  • reset --mixed and --hard do not restore the index file to how it was during the target commit but clear them instead so there is a need to add again as required
  • the implementation does not implement plumbing commands underneath
  • force line endings, while reading a file, leGit autoconverts lineendings to \n. so while your working dir may contain CRLF, commits only contain LF and checking out any commit will replace line endings.
  • in case of a merge conflict, we do not follow the same procedure as git, we use MERGE_HEAD alone to help identify incoming commit. during the commit, the index file does maintain 3 different versions of the files, the only thing that happens is conflict markers appearing in the conflicted files, need to make changes to show the conflicted files. The merge can be completed by merge --continue

Future plans

Installation (dev)

  1. Clone the repo and cd into it
    git clone https://github.com/onedisha/leGit.git
    cd leGit
  2. Install dependencies
    npm i
    npm i --global pkg
  3. Add current working directory to Path
    pwd (get path and use that)
    // add that to the syste env path
  4. Change the path variable in src/index.js file to the path of src/legit.js
    npm run bin

Now feel free to use this version of legit anywhere in your system, note that it takes the live version of all the contents of legit.js each time, hence your changes if any will affect the places where you use legit.

Installation (npm)

npm i -g thegit

Usage

If downloaded via npm you need to use thegit instead of legit (due to legit not being available) otherwise use legit.