chore: auto-generate README.md from toc-source.json

This commit is contained in:
github-actions[bot]
2025-07-11 03:26:51 +00:00
parent 2e3653ee7d
commit 8167604096
5 changed files with 52 additions and 3 deletions

View File

@@ -6,6 +6,8 @@
![Category: Branch Management](https://img.shields.io/badge/Category-Branch%20Management-blue)
> Delete all local branches whose remote counterpart has been deleted, using Bash.
This command fetches the latest remote info and deletes all local branches whose remote tracking branch no longer exists (marked as 'gone'). Useful for cleaning up after remote branch deletions.
#### Command
```sh

View File

@@ -8,6 +8,8 @@
![Category: Branch Management](https://img.shields.io/badge/Category-Branch%20Management-blue)
> Delete all local branches whose remote counterpart has been deleted, using PowerShell.
This script fetches the latest remote info and deletes all local branches whose remote tracking branch no longer exists (marked as 'gone'). Useful for cleaning up after remote branch deletions.
#### Command
```sh

View File

@@ -6,6 +6,8 @@
![Category: Maintenance](https://img.shields.io/badge/Category-Maintenance-blue)
> Runs a cronJob in background for the specified repo for periodic maintenance.
`git maintenance start` enables background maintenance tasks for your Git repository. It sets up scheduled jobs (using your systems scheduler, like cron on Unix or Task Scheduler on Windows) to automatically run Git maintenance commands at regular intervals. This keeps your repository fast and healthy by running tasks like garbage collection, commit-graph optimization, and cleanup operations in the background, so you dont have to remember to do it manually.
#### Command
```sh
@@ -29,15 +31,21 @@ git maintenance start --schedule=hourly
#### Steps
1. Run `git maintenance start` in your repository.
2. Optionally, use `--schedule=hourly` or `--schedule=daily` to control how often maintenance runs.
3. `Git will now automatically run tasks like garbage collection, pruning unreachable objects, and optimizing internal data structures in the background`.
4. You can stop background maintenance with `git maintenance stop` if needed.
#### ProTips
> [!TIP]
> Set up maintenance on large repos to keep them fast.
> Set up maintenance on large or long-lived repos to keep them fast and healthy.
> [!TIP]
> Use with cron or scheduled tasks for automation.
> [!TIP]
> If you notice Git getting slow, check if maintenance is enabled or run it manually.
#### Links

View File

@@ -8,6 +8,8 @@
![Category: Collaboration](https://img.shields.io/badge/Category-Collaboration-blue)
> Generate a request to pull changes into a repository.
`git request-pull` generates a summary message describing the changes between two commits, which you can send to a project maintainer to request that they pull your changes. This is especially useful for email-based workflows or when collaborating outside of platforms like GitHub. The command outputs a message that includes a comparison summary, a list of commits, and their messages, making it easy for maintainers to review and apply your changes.
#### Command
```sh
@@ -15,6 +17,31 @@ git request-pull <start> <url> <end>
```
#### Examples
- **Generates a summary like:
```The following changes since commit 1234567... (main):
Some previous commit message
are available in the Git repository at:
https://github.com/example/repo.git feature-branch
for you to fetch changes up to 89abcde... (feature-branch):
New feature commit message
Another commit message
----------------------------------------------------------------
file1.txt | 10 ++++++++++
file2.js | 5 +++++
2 files changed, 15 insertions(+)
```**
```sh
git request-pull main https://github.com/example/repo.git feature-branch
```
- **Generate a pull request message from v1.0 to v1.1.**
@@ -30,16 +57,21 @@ git request-pull main https://github.com/example/repo.git feature-branch
#### Steps
1. Run `git request-pull <start> <url> <end>` to generate a pull request message.
1. Identify the base commit or branch you want to compare from (e.g., main or v1.0).
2. Run `git request-pull <start> <url> <end>` to generate a pull request message.
3. Send the generated message to the project maintainer (e.g., via email or chat).
#### ProTips
> [!TIP]
> Use request-pull to generate a summary for code reviews.
> Use this command when collaborating via email or outside of web-based platforms.
> [!TIP]
> Include a clear start and end point for clarity.
> [!TIP]
> Review the generated message before sending to ensure it accurately describes your changes.
#### Links

View File

@@ -6,6 +6,11 @@
![Category: Patch & Diff](https://img.shields.io/badge/Category-Patch%20%26%20Diff-blue)
| Command | Use Case | Preserves Commit Info? | Can Apply With |
|---|---|---|---|
| git diff > file.diff | Share uncommitted changes | ❌ | git apply |
| git format-patch > file.patch | Share committed changes | ✅ | git am |
---