before installation, make sure you have the following dependencies installed:
- java - required to compile and run gitz
- chafa - used for image rendering in the terminal
to install gitz and make it executable globally, follow these steps:
step 1: compile and package
javac *.java
jar cfm gitz.jar MANIFEST.MF *.class def.pngstep 2: move to a global path
sudo mv gitz.jar /usr/local/bin/gitzstep 3: make an alias for convenience
echo 'alias gitz="java -jar /usr/local/bin/gitz"' >> ~/.bashrc
source ~/.bashrcrun the provided setup script:
chmod +x setup.sh
./setup.shto create a new gitz repository, run:
gitz initthis will create a .gitz directory with necessary subdirectories and configuration files. it will also copy def.png into .gitz/img/.
gitz init→ initializes a new repository
gitz cat-file <object> [type]→ displays the contents of an objectgitz hash-object [-w] -t <type> <file>→ hashes an object and optionally writes it
gitz ls-tree <tree-hash>→ lists the contents of a tree objectgitz checkout <commit-hash> <path>→ checks out a commit into a directorygitz log→ shows commit history
gitz show-ref→ shows referencesgitz tag <tag-name> [commit]→ creates a tag
gitz rev-parse <name> [-t type]→ resolves a name to an object id
gitz ls-files [-v]→ lists tracked filesgitz check-ignore <file>→ checks if a file is ignoredgitz status→ shows the working directory statusgitz add <file>→ stages a file for commitgitz rm <file>→ removes a file from tracking
gitz commit -m <message>→ creates a commit with a default blackbeard image hehegitz commit -m <message> -i <image_path>→ creates a commit with an image
gitz show-index→ shows the index contentsgitz dump-index→ dumps the raw index file
gitz init
echo "hello world" > file.txt
gitz add file.txt
gitz commit -m "init"i refered this book - https://wyag.thb.lt/