Skip to content

Commit

Permalink
docs: add arch docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rootCircle committed Sep 16, 2024
1 parent ec365a0 commit e79bafc
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 56 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/target
/.vscode/
/.idea/
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/bgit.iml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/developer-tools.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bgit: Git Wrapper for Absolute Beginners
# bgit: One command for most of git

bgit is a simplified wrapper for Git, designed specifically for absolute beginners who find the Git workflow daunting. It automates common Git tasks such as adding, committing, and pushing changes, while also incorporating smart rules to prevent common issues like accidentally adding sensitive files or directories such as `.env` or `node_modules`.

Expand All @@ -11,24 +11,27 @@ bgit is a simplified wrapper for Git, designed specifically for absolute beginne

## Installation

> [!WARNING]
> Windows compilation is broken, as `hook_executor` is not implemented yet for that platform! Fix on the way :wink:
bgit is written in Rust, ensuring fast performance and reliability. To install bgit, follow these steps:

1. Ensure you have Rust installed. You can install Rust using rustup by following the instructions on [rustup.rs](https://rustup.rs/).
2. Clone the bgit repository from GitHub:

```
```bash
git clone https://github.com/Gyan172004/bgit.git
```

3. Navigate to the bgit directory:

```
```bash
cd bgit
```

4. Build bgit using Cargo:

```
```bash
cargo build --release
```

Expand All @@ -40,20 +43,15 @@ To start using bgit, navigate to your Git repository directory in your terminal

Here's a basic example of how to use bgit:
```
```bash
bgit
```
Follow the on-screen prompts to add, commit, and push your changes. bgit will handle the rest, ensuring that only relevant files are included and that your Git repository remains clean and organized.
## How it works?
Here is a high level overview diagram of how bgit will work!
![bgit-init](https://github.com/Gyan172004/bgit/assets/137227305/99c7aa1b-a4a4-46ab-bdbe-f9f14898ae33)
![bgit-check](https://github.com/Gyan172004/bgit/assets/137227305/12d68127-30ce-4f07-8f9f-b815c8264f24)
![Untitled-2024-04-22-0126](https://github.com/Gyan172004/bgit/assets/137227305/3f9ba8ec-b9aa-497e-950f-3f1d52955ba8)
If you're interested in finding how bgit works, take a look at [ARCHITECTURE.md](./docs/ARCHITECTURE.md).

## Contributing

Expand All @@ -66,4 +64,3 @@ bgit is licensed under the MIT License. See the [LICENSE](https://github.com/Gya
## Disclaimer

Please note that while bgit aims to simplify the Git workflow for beginners, it is not a replacement for learning Git fundamentals. We encourage users to continue learning about Git to fully understand its capabilities and best practices.
31 changes: 31 additions & 0 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Architecture

## High level architecture

![bgit arch](./bgit_arch.png)

## Workflows

### 1. Workflow for default command

- For everything of git from stash to commit, push, every common commands one may use!

![default workflow](./workflow.png)

### 2. Workflow for bgit-init

- To initialize `bgit`, called as post-install hook at install

![bgit-init](https://github.com/Gyan172004/bgit/assets/137227305/99c7aa1b-a4a4-46ab-bdbe-f9f14898ae33)

### 3. Workflow for bgit-check

- To do maintenance tasks like gc, filtering commits etc

![bgit-check](https://github.com/Gyan172004/bgit/assets/137227305/12d68127-30ce-4f07-8f9f-b815c8264f24)

## Planned Features

1. Using platform specific conditional hooks, with more granular control, like post clone etc. (Helpful to get started with a project fast!)
2. Local gitignore that is not pushed along with the current files.
3. Custom rules that disallows changes in specific files unless required! Respecting `CODEOWNERS` files!
Binary file added docs/bgit_arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e79bafc

Please sign in to comment.