Skip to content
/ Nit Public

A simple version control system built in Node Js

Notifications You must be signed in to change notification settings

srijit2002/Nit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nit - A Simple Version Control System

Nit is a simple version control system built using Node.js. (Step Brother of Git)

Installation

To get started, make sure you have latest version of Node.js installed. Then, follow these steps:

  1. Clone this repository.

    git clone https://github.com/srijit2002/Nit.git
    
  2. Navigate to the project directory in your terminal.

    cd Nit
    
  3. Install the required dependencies by running:

    npm install
    
  4. Run the following command

    npm link
    

Commands and Use Cases

1. Initialize a Repository

Initialize an empty Nit repository in your project directory.

  nit init

image

2. Configuration

View or set configuration options for your Nit repository.

  nit config <key> [value]

image

3. Add Changes to Staging

Add changes in the working directory to the staging area. You can specify multiple file paths to add.

  nit add <paths...>

image

4. Commit Changes

Capture a snapshot of the project's currently staged changes with a commit message.

  nit commit <message>

image

5. Display Repository Status

Display the state of the working directory and the staging area

 nit status

image

6. Show Differences

Display changes between the working directory and the index. You can specify multiple space separated file paths.

 nit diff [paths...]

image

7. Pretty-print Commit Logs

Display the contents of the commit logs.

 nit log

image

8. Revert a File to a Previous Version

Revert a file to the last committed version or a specific commit using the -c option.

 nit checkout <filepaths...>
 nit checkout -c <commitId> <filepaths...>

image

Resources Used

  1. Git Internals (part-1)
  2. Git Internals (part-2)
  3. Git Internals (part-3)
  4. Git Internals by John Britton of GitHub - CS50 Tech Talk
  5. How Does Git Store Files?
  6. Myers Diff Algo
  7. The Myers diff algorithm
  8. Bufferpack
  9. Patience

About

A simple version control system built in Node Js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published