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

This commit is contained in:
github-actions[bot]
2025-07-11 02:33:03 +00:00
parent 2d2df258a8
commit c10622a82e
8 changed files with 72 additions and 0 deletions

View File

@@ -6,6 +6,15 @@
![Category: Branch Management](https://img.shields.io/badge/Category-Branch%20Management-blue)
> Quickly view and clean up local branches using Bash or PowerShell, including removing branches whose remote is gone.
#### ProTips
> [!TIP]
> Run 'git fetch -p' before cleaning up branches to update remote info.
> [!TIP]
> Always double-check which branches will be deleted.
## Key Topics & Subcommands
- [Delete Local Branches Whose Remote is Gone (Bash)](./delete-local-branches-whose-remote-is-gone-bash.md): Delete all local branches whose remote counterpart has been deleted, using Bash.
- [Delete Local Branches Whose Remote is Gone (PowerShell)](./delete-local-branches-whose-remote-is-gone-powershell.md): Delete all local branches whose remote counterpart has been deleted, using PowerShell.

View File

@@ -32,6 +32,15 @@ git fetch -p && git branch -vv | grep '\[origin/.*: gone\]' | awk '{print $1}' |
- ⚠️ Make sure you have no unmerged work on these branches.
#### ProTips
> [!TIP]
> Use this after deleting branches on the remote to keep your local repo tidy.
> [!TIP]
> Add 'echo' before 'git branch -d' to preview what will be deleted.
[➡️ See the Next Step: Delete Local Branches Whose Remote is Gone (PowerShell)](./delete-local-branches-whose-remote-is-gone-powershell.md)
---

View File

@@ -36,6 +36,15 @@ git branch -vv | ForEach-Object { if ($_ -match '[.*: gone]') { $parts = $_.Trim
- ⚠️ Make sure you have no unmerged work on these branches.
#### ProTips
> [!TIP]
> Great for Windows users to automate branch cleanup.
> [!TIP]
> Review the list before confirming deletion.
[➡️ See the Next Step: View and Clean Up Local Git Branches (Bash)](./view-and-clean-up-local-git-branches-bash.md)
---

View File

@@ -8,6 +8,15 @@
A collection of practical, lesser-known, and foundational Git commands that are useful for all users. Start here to discover commands that can improve your workflow and understanding of Git.
#### ProTips
> [!TIP]
> Try these commands in a test repo before using them on important projects.
> [!TIP]
> Bookmark this section for quick reference to hidden gems.
## Key Topics & Subcommands
- [git maintenance start](./git-maintenance-start.md): Runs a cronJob in background for the specified repo for periodic maintenance.
- [git request-pull](./git-request-pull.md): Generate a request to pull changes into a repository.

View File

@@ -25,6 +25,15 @@ git maintenance start
1. Run `git maintenance start` in your repository.
#### ProTips
> [!TIP]
> Set up maintenance on large repos to keep them fast.
> [!TIP]
> Use with cron or scheduled tasks for automation.
#### Links
- [Official Docs](https://git-scm.com/docs/git-maintenance)

View File

@@ -27,6 +27,15 @@ git request-pull v1.0 https://github.com/example/repo.git v1.1
1. Run `git request-pull <start> <url> <end>` to generate a pull request message.
#### ProTips
> [!TIP]
> Use request-pull to generate a summary for code reviews.
> [!TIP]
> Include a clear start and end point for clarity.
#### Links
- [Official Docs](https://git-scm.com/docs/git-request-pull)

View File

@@ -35,6 +35,15 @@ git branch -vv | grep -E '^\s*\S+\s+[^\[]+$' | awk '{print $1}' | xargs git bran
- ⚠️ Deleting branches is irreversible. Double-check before running destructive commands.
#### ProTips
> [!TIP]
> Use 'git branch -vv' to see tracking info for all branches.
> [!TIP]
> Pipe to 'awk' and 'xargs' for batch deletion.
[➡️ See the Next Step: View and Clean Up Local Git Branches (PowerShell)](./view-and-clean-up-local-git-branches-powershell.md)
---

View File

@@ -35,6 +35,15 @@ git branch -vv | Select-String -NotMatch "origin/" | ForEach-Object { $branch =
- ⚠️ Deleting branches is irreversible. Double-check before running destructive commands.
#### ProTips
> [!TIP]
> Use PowerShell's 'Select-String' for flexible filtering.
> [!TIP]
> Automate cleanup with a script for regular maintenance.
---
_Author: mike-rambil • Updated: 2024-06-10 • Tags: branches, cleanup, powershell_