Skip to content

HosokawaR/own-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Own Git

This is an (incomplete) reproduction implementation of Git in TypeScript on Deno.

2024-05-06.171951.mp4

Features

Only basic features are implemented. Some operations are not implemented yet.

  • init
  • add
  • commit
  • log
  • checkout

For development, you can PLANE_MODE=true. This option make git store data in plain files instead of binary files to see the contents.

Deno

Support only ASCII contents.

git clone https://github.com/HosokawaR/own-git
cd own-git
mkdir _sand && cd _sand

export PLANE_MODE=true

# Initialize
deno run -A ../index.ts init

# some file
echo "Hello" > README.md

# Add
deno run -A ../index.ts add README.md

# Commit
deno run -A ../index.ts commit -m "1st"

# modify file
echo "World!!" > README.md

# Add
deno run -A ../index.ts add README.md

# Log
deno run -A ../index.ts log

# Checkout
deno run -A ../index.ts checkout <commit SHA>

About

自作の Git もどき

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published