Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aditya1404sal/fit
A version control system built purely in Rust. The Prodigal son of git.
https://github.com/aditya1404sal/fit
git rust version-control
Last synced: about 1 month ago
JSON representation
A version control system built purely in Rust. The Prodigal son of git.
- Host: GitHub
- URL: https://github.com/aditya1404sal/fit
- Owner: Aditya1404Sal
- License: apache-2.0
- Created: 2024-07-16T17:32:35.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-11T16:09:34.000Z (4 months ago)
- Last Synced: 2024-08-11T20:08:36.707Z (4 months ago)
- Topics: git, rust, version-control
- Language: Rust
- Homepage:
- Size: 2.2 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fit: A Version Control System
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.
## Features
- 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## Installation
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](https://www.rust-lang.org/tools/install).
1. Clone the repository:
```sh
git clone https://github.com/yourusername/fit.git
cd fit
```2. Build the project:
```sh
cargo build --release
```3. Add the `fit` executable to your PATH:
```sh
export PATH=$PATH:/path/to/fit/target/release
```## Usage
Here are the commands you can use with fit:
### Initialize a Repository
```sh
fit init
```### Clone a Repository (Under Development)
```sh
fit clone
```
### Log Commit History
```sh
fit log
```
### Add a File to the Staging Area
```sh
fit add
```
### Remove a File from the Staging Area
```sh
fit rm
```
### Commit Changes
```sh
fit commit -m "Commit message"
```
### View the Contents of an Object
```sh
fit cat-file
```
### Check the Status of the Working Directory
```sh
fit status
```
### Reset to a Specific Commit
```sh
fit reset
```
### Viewing Diff of currently staged items and latest commit
```sh
fit diff
```
### Viewing Diff of any 2 Commits
```sh
fit diff commit
```
### Stashing un-commited changes for a clean work-tree
```sh
fit stash
```
### Popping last stashed content to present working directory
```sh
fit stash pop
```
## Branch Management### List All Branches
```sh
fit branch list
```### Create a New Branch
```sh
fit branch create
```### Delete a Branch
```sh
fit branch delete
```### Checkout a Branch / Switch to a branch
```sh
fit branch checkout
```### Create and Checkout a New Branch
```sh
fit branch checkout-new
```## Example Workflow
### Initialize a new repository:
```sh
fit init
```
### Add files to the staging area:```sh
fit add file1.txt
fit add file2.txt
```
### Commit the changes:```sh
fit commit -m "Initial commit"
```
### Check the commit history:```sh
fit log
```
### View the status of the working directory:```sh
fit status
```
### Reset to a previous commit:```sh
fit reset
```## Contributing
Contributions are welcome! Feel free to submit issues, fork the repository, and open pull request