Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kei-k23/rgit
Git implementation in Rust from scratch.
https://github.com/kei-k23/rgit
git rust version-control
Last synced: about 1 month ago
JSON representation
Git implementation in Rust from scratch.
- Host: GitHub
- URL: https://github.com/kei-k23/rgit
- Owner: Kei-K23
- License: mit
- Created: 2024-09-12T13:36:27.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-16T11:35:29.000Z (about 2 months ago)
- Last Synced: 2024-09-29T15:22:15.085Z (about 1 month ago)
- Topics: git, rust, version-control
- Language: Rust
- Homepage:
- Size: 59.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rgit
**Rgit** is a simplified Git implementation written in **Rust**. It replicates key features of Git, such as **creating repositories**, **adding files**, **committing changes**, and working with **branches**, **tags**, and **remotes**.
## Features
- Initialize a new Git repository or reinitialize an existing one (`init`)
- Add files to the staging area (`add`)
- Commit changes to the repository (`commit`)
- Check the status of your working directory (`status`)
- Show commit history (`log`)
- Create, list, or delete branches (`branch`)
- Checkout to different branches or commits (`checkout`)
- Create, list, or delete tags (`tag`)
- Compare changes between commits or working tree (`diff`)
- Manage repository configuration (`config`)
- Manage remote repositories (`remote`)## Installation
1. Clone the repository:
```bash
git clone https://github.com/Kei-K23/rgit.git
```2. Navigate to the project directory:
```bash
cd rgit
```3. Build the project:
```bash
cargo build --release
```4. Run the rgit binary:
```bash
./target/release/rgit
```## Usage
You can interact with rgit through various subcommands. Here are some examples:
### Initialize a Repository
```bash
./target/release/rgit init
```This will create an empty Git repository or reinitialize an existing one.
### Add Files
```bash
./target/release/rgit add
```Stage file contents to the index.
### Commit Changes
```bash
./target/release/rgit commit -m "Your commit message"
```Record changes to the repository with a message.
### Check Repository Status
```bash
./target/release/rgit status
```Display the current state of the working directory and staging area.
### View Commit Log
```bash
./target/release/rgit log
```Show the commit history of the repository.
### Create a New Branch
```bash
./target/release/rgit branch
```Create a new branch.
### Checkout a Branch or Commit
```bash
./target/release/rgit checkout
```Switch to another branch or checkout a specific commit.
### Tag Management
#### Create a new tag:
```bash
./target/release/rgit tag
```#### List all tags:
```bash
./target/release/rgit tag
```#### Delete a tag:
```bash
./target/release/rgit tag -d
```### Compare Changes
```bash
./target/release/rgit diff
```Show changes between the working directory, staged changes, and commit history.
### Configure Repository
#### Set a configuration value:
```bash
rgit config set
```#### Get a configuration value:
```bash
rgit config get
```### Manage Remotes
#### Add a new remote:
```bash
rgit remote add
```#### Remove a remote:
```bash
rgit remote remove
```## License
This project is licensed under the MIT License. See the [LICENSE](/LICENSE) file for details.