fit is a version control system inspired by Git. It offers similar functionality with commands to initialize, clone, add, remove, commit, log, reset, and check the status of your repositories. fit is written in Rust and uses SHA-1 for hashing, zlib for compression, and offers a simple CLI for interaction.
- Initialize a new repository
- Clone an existing repository (under development)
- Log commit history
- Add and remove files to/from the staging area
- Commit changes
- View the contents of repository objects
- Check the status of the working directory
- Reset to a specific commit
- Viewing Diff between two commits
- Creating and switching to branches
- Cloning branches
To install fit, you need to have Rust installed on your system. If you don't have Rust installed, you can get it from here.
-
Clone the repository:
git clone https://github.com/yourusername/fit.git cd fit
-
Build the project:
cargo build --release
-
Add the
fit
executable to your PATH:export PATH=$PATH:/path/to/fit/target/release
Here are the commands you can use with fit:
fit init
fit clone <url>
fit log
fit add <file-path>
fit rm <file-path>
fit commit -m "Commit message"
fit cat-file <hash>
fit status
fit reset <commit-hash>
fit diff
fit diff commit <commit_1> <commit_2>
fit stash
fit stash pop
fit branch list
fit branch create <branch_name>
fit branch delete <branch_name>
fit branch checkout <branch_name>
fit branch checkout-new <branch_name>
fit init
fit add file1.txt
fit add file2.txt
fit commit -m "Initial commit"
fit log
fit status
fit reset <commit-hash>
Contributions are welcome! Feel free to submit issues, fork the repository, and open pull request