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.
- 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
)
- Clone the repository:
git clone https://github.com/Kei-K23/rgit.git
- Navigate to the project directory:
cd rgit
- Build the project:
cargo build --release
- Run the rgit binary:
./target/release/rgit
You can interact with rgit through various subcommands. Here are some examples:
./target/release/rgit init
This will create an empty Git repository or reinitialize an existing one.
./target/release/rgit add <file>
Stage file contents to the index.
./target/release/rgit commit -m "Your commit message"
Record changes to the repository with a message.
./target/release/rgit status
Display the current state of the working directory and staging area.
./target/release/rgit log
Show the commit history of the repository.
./target/release/rgit branch <branch_name>
Create a new branch.
./target/release/rgit checkout <branch_name|commit_hash>
Switch to another branch or checkout a specific commit.
./target/release/rgit tag <tag_name>
./target/release/rgit tag
./target/release/rgit tag -d <tag_name>
./target/release/rgit diff
Show changes between the working directory, staged changes, and commit history.
rgit config set <key> <value>
rgit config get <key>
rgit remote add <name> <url>
rgit remote remove <name>
This project is licensed under the MIT License. See the LICENSE file for details.