diff --git a/contents/git-command-reference-full-list.md b/contents/git-command-reference-full-list.md index c324404..de12baf 100644 --- a/contents/git-command-reference-full-list.md +++ b/contents/git-command-reference-full-list.md @@ -12,6 +12,10 @@ A comprehensive list of Git commands used in this project, formatted according to our standard. +## Key Topics & Subcommands +- [git init --bare](./git-init-bare.md): Initialize a bare repository, typically used for remote repositories. +- [git clone --mirror ](./git-clone-mirror-repository.md): Clone a repository in mirror mode, including all refs and branches. + --- diff --git a/contents/how-to-use-git-worktree-safely.md b/contents/how-to-use-git-worktree-safely.md index 6fc95d9..1c0ff40 100644 --- a/contents/how-to-use-git-worktree-safely.md +++ b/contents/how-to-use-git-worktree-safely.md @@ -16,6 +16,14 @@ `git worktree` allows you to manage multiple working directories linked to a single Git repository. It helps developers work on multiple branches simultaneously without switching branches in the same directory. +## Key Topics & Subcommands +- [Check Existing Worktrees](./check-existing-worktrees.md) +- [Create a New Worktree](./create-a-new-worktree.md) +- [Remove a Worktree](./remove-a-worktree.md) +- [Switch Between Worktrees](./switch-between-worktrees.md) +- [Use Worktrees for Temporary Fixes](./use-worktrees-for-temporary-fixes.md) +- [Flags and Their Uses](./flags-and-their-uses.md) + --- diff --git a/contents/miscellaneous-orphaned-git-commands.md b/contents/miscellaneous-orphaned-git-commands.md index 01c39a3..7dcb9d0 100644 --- a/contents/miscellaneous-orphaned-git-commands.md +++ b/contents/miscellaneous-orphaned-git-commands.md @@ -14,6 +14,12 @@ This file collects useful Git commands and scripts that were previously only in the README and not referenced elsewhere in this repository. +## 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 and Clean Up Local Git Branches (Bash)](./view-and-clean-up-local-git-branches-bash.md): Scripts to view and clean up local branches using Bash. +- [View and Clean Up Local Git Branches (PowerShell)](./view-and-clean-up-local-git-branches-powershell.md): Scripts to view and clean up local branches using PowerShell. + --- diff --git a/contents/past-commits-of-a-specific-file.md b/contents/past-commits-of-a-specific-file.md index 2775005..1def26d 100644 --- a/contents/past-commits-of-a-specific-file.md +++ b/contents/past-commits-of-a-specific-file.md @@ -14,6 +14,12 @@ You can see all commits related to a specific file using Git commands. Here are a few ways to do it: +## Key Topics & Subcommands +- [Show Commit History of a Specific File](./show-commit-history-of-a-specific-file.md) +- [Show Detailed Commit History (With Changes)](./show-detailed-commit-history-with-changes.md) +- [Show Commit History With Author and Date](./show-commit-history-with-author-and-date.md) +- [See Who Last Modified Each Line (Blame)](./see-who-last-modified-each-line-blame.md) + --- diff --git a/contents/sharing-changes-as-patch-files.md b/contents/sharing-changes-as-patch-files.md index c47c00a..c9492a4 100644 --- a/contents/sharing-changes-as-patch-files.md +++ b/contents/sharing-changes-as-patch-files.md @@ -15,6 +15,13 @@ How to create patch files from your changes for sharing via email, SCP, Slack, or other means. Covers both committed (with full commit metadata) and uncommitted changes. +## Key Topics & Subcommands +- [Create Patch from Last Commit(s)](./create-patch-from-last-commit-s.md) +- [Apply Patch with Commit Metadata](./apply-patch-with-commit-metadata.md) +- [Create Patch from Uncommitted Changes](./create-patch-from-uncommitted-changes.md) +- [Apply Diff File](./apply-diff-file.md) +- [Patch vs Diff: Quick Reference](./patch-vs-diff-quick-reference.md) + --- diff --git a/contents/useful-rare-git-commands-you-never-heard-of.md b/contents/useful-rare-git-commands-you-never-heard-of.md index 8ec16f5..e78e564 100644 --- a/contents/useful-rare-git-commands-you-never-heard-of.md +++ b/contents/useful-rare-git-commands-you-never-heard-of.md @@ -11,6 +11,9 @@ A collection of lesser-known but powerful Git commands. Use these to level up your Git workflow! +## Key Topics & Subcommands +- [git replace ](./git-replace-old-commit-new-commit.md): Temporarily substitute one commit for another. + --- diff --git a/scripts/generate-readme.js b/scripts/generate-readme.js index a1bf45b..df0d368 100644 --- a/scripts/generate-readme.js +++ b/scripts/generate-readme.js @@ -220,7 +220,7 @@ function conciseMetaLine(author, lastUpdated, tags) { function generateMiniSubtocTOC(obj) { if (!obj.subtoc || !obj.subtoc.length) return ''; - let out = '## Subcommands\n'; + let out = '## Key Topics & Subcommands\n'; obj.subtoc.forEach((sub) => { out += `- [${sub.Name}](./${slugify(sub.Name)}.md)`; if (sub.short_description) out += `: ${sub.short_description}`; @@ -235,10 +235,7 @@ function generateContentFile(obj, idx, tocData) { md += `# ${obj.Name}\n\n`; if (obj.category) md += renderCategory(obj.category); if (obj.short_description) md += `> ${obj.short_description}\n\n`; - // Always add mini-TOC if subtoc exists - if (obj.subtoc && obj.subtoc.length) { - md += generateMiniSubtocTOC(obj); - } + if (obj.long_description) md += `${obj.long_description}\n\n`; if (obj.command) md += renderCommand(obj.command); if (obj.flags) md += renderFlags(obj.flags); @@ -251,6 +248,12 @@ function generateContentFile(obj, idx, tocData) { if (obj.links) md += renderLinks(obj.links); if (obj.related_commands) md += renderRelatedCommands(obj.related_commands); if (obj.output_example) md += renderOutputExample(obj.output_example); + + // Always add mini-TOC if subtoc exists + if (obj.subtoc && obj.subtoc.length) { + md += generateMiniSubtocTOC(obj); + } + md += conciseMetaLine(obj.author, obj.last_updated, obj.tags); return md; }