1.0.1 • Published 1 month ago

thegit v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Introduction

Features

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

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.