Skip to content

attempting to create the basic functionalities of git from scratch in rust ..

License

Notifications You must be signed in to change notification settings

Youssef-Shehata/rusty-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git CLI Tool In Rust

Table of Contents

  1. Introduction
  2. Installation
  3. Basic Usage
  4. Soon

Introduction

Trying to write git from scratch in Rust , implementing almost the same functionality as the original in an attempt to learn the internals of git to use it better.

refrences that helped during this process: freecodecamp visual guide to git internals

so far ive implemented :

  • init initialize an empty repo in the desired folder; creating HEAD,objects/ and refs/.
  • hash-object hash a blob file , with the option to write to git/objects.
  • cat-file write the contents of a compressed blob.
  • ls-tree write the contents of a git tree object with objects to recurse,write namesonly, etc...
  • write-tree write the current tree of your working directory with all the folders and files (no staging area yet).

Installation

this project is still in development , so you will have to clone this repo and compile it yourself. for convenience you will find a small script called rusty-git.sh that will compile and run for you.

or you can build it manually:

cargo build --release

Basic Usage

rusty-git.sh [COMMAND] [OPTION]...[FILE]...

-help menu:

    ./rusty-git.sh --help

-initialize an empty repo:

    ./rusty-git.sh init .

or

    ./rusty-git.sh init my-new-project-directory

-hash a file and store it in your objectsd dir :

    ./rusty-git.sh hash-object -w file.txt

About

attempting to create the basic functionalities of git from scratch in rust ..

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published