Cit is a professional-grade version control system written in C. It is designed to provide a secure, lightweight, and fast local version control experience by employing SHA-256 hashing for data integrity and optimized filesystem operations.
- Data Integrity: Mandatory SHA-256 identification for all project objects.
- Architecture: Modular C design with zlib-based compression.
- Portability: POSIX-compliant implementation supporting Linux, macOS, Android (Termux), and Windows environments.
- Efficiency: Dynamic memory management for handling large repositories.
To compile Cit, ensure that the GCC compiler, Make, and the zlib development library are installed on your system. Execute the following command in the project root:
makeTo use Cit efficiently from any directory, move the compiled binary to a location in your system's execution path (PATH).
For Linux, macOS, or Termux:
# Move the binary to a standard local bin directory
mkdir -p ~/bin
cp cit ~/bin/
# Ensure ~/bin is in your shell's PATH by adding this to your .bashrc or .zshrc:
export PATH="$HOME/bin:$PATH"Alternatively, for system-wide access (requires administrative privileges):
sudo cp cit /usr/local/bin/You must configure your global identity before performing commit or branch operations:
cit config -u "Full Name"
cit config -e "email@example.com"Convert a directory into a Cit repository:
cit initAdd files or directories to the staging area:
cit add <filename> # Stage a specific file
cit add . # Stage all changes in the current directoryView the current state of the working directory and staged changes:
cit statusRecord the staged snapshot into the repository history:
cit commit "Descriptive commit message"- View commit logs:
cit log - List all branches:
cit branch - Create a new branch:
cit branch <branch_name> - Delete a branch:
cit branch -d <branch_name>
Restore the working directory or specific files to a previous state:
cit checkout <commit_sha>Note: Cit will request manual confirmation (y/n) before overwriting existing local files.
This project is licensed under the MIT License.
