This is an (incomplete) reproduction implementation of Git in TypeScript on Deno.
2024-05-06.171951.mp4
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.
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>