Skip to content

aashreyj/version-control

Repository files navigation

CS3.304: Advanced Operating Systems

Assignment 4: Version Control system

Description

This assignment is an implementation of a Version Control System like Git in C++. The following commands are currently supported:

1. ./mygit init: initializes the repository
2. ./mygit hash-object: compresses a file and generates the SHA-1 hash
3. ./mygit cat-file: print metadata of a file
4. ./mygit write-tree: write the current directory structure to a tree
5. ./mygit ls-tree: show a tree file
6. ./mygit add <files>: add the files to the staging area
7. ./mygit commit -m <message>: commit the staged changes to the repo
8. ./mygit log: show logs of the commits that have been made
9. ./mygit checkout: checkout a particular commit of the repository

How to Execute:

  1. This project uses zlib for file compression. If it is not installed on the system, it should be installed by running:

    sudo apt install zlib1g zlib1g-dev
    
  2. Compile the source code using the Makefile:

    aashrjai@aashrey-tuf: ~/<path>/20224202012_Assignment4$ make
    
  3. Run the desired command:

    aashrjai@aashrey-tuf: ~/<path>/20224202012_Assignment4$ ./mygit <command>
    

The first command is always expected to be the ./mygit init command to initialize the repository.

About

A Version Control System, similar to Git, implemented in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published