Skip to content

Commit e327b23

Browse files
authored
Merge pull request #44 from mike-rambil/fix/mainContent
Fix/main content
2 parents df07bef + b769f9b commit e327b23

7 files changed

+42
-5
lines changed

contents/git-command-reference-full-list.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
A comprehensive list of Git commands used in this project, formatted according to our standard.
1414

15+
## Key Topics & Subcommands
16+
- [git init --bare](./git-init-bare.md): Initialize a bare repository, typically used for remote repositories.
17+
- [git clone --mirror <repository>](./git-clone-mirror-repository.md): Clone a repository in mirror mode, including all refs and branches.
18+
1519

1620
---
1721

contents/how-to-use-git-worktree-safely.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616

1717
`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.
1818

19+
## Key Topics & Subcommands
20+
- [Check Existing Worktrees](./check-existing-worktrees.md)
21+
- [Create a New Worktree](./create-a-new-worktree.md)
22+
- [Remove a Worktree](./remove-a-worktree.md)
23+
- [Switch Between Worktrees](./switch-between-worktrees.md)
24+
- [Use Worktrees for Temporary Fixes](./use-worktrees-for-temporary-fixes.md)
25+
- [Flags and Their Uses](./flags-and-their-uses.md)
26+
1927

2028
---
2129

contents/miscellaneous-orphaned-git-commands.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414

1515
This file collects useful Git commands and scripts that were previously only in the README and not referenced elsewhere in this repository.
1616

17+
## Key Topics & Subcommands
18+
- [git maintenance start](./git-maintenance-start.md): Runs a cronJob in background for the specified repo for periodic maintenance.
19+
- [git request-pull](./git-request-pull.md): Generate a request to pull changes into a repository.
20+
- [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.
21+
- [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.
22+
1723

1824
---
1925

contents/past-commits-of-a-specific-file.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414

1515
You can see all commits related to a specific file using Git commands. Here are a few ways to do it:
1616

17+
## Key Topics & Subcommands
18+
- [Show Commit History of a Specific File](./show-commit-history-of-a-specific-file.md)
19+
- [Show Detailed Commit History (With Changes)](./show-detailed-commit-history-with-changes.md)
20+
- [Show Commit History With Author and Date](./show-commit-history-with-author-and-date.md)
21+
- [See Who Last Modified Each Line (Blame)](./see-who-last-modified-each-line-blame.md)
22+
1723

1824
---
1925

contents/sharing-changes-as-patch-files.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515

1616
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.
1717

18+
## Key Topics & Subcommands
19+
- [Create Patch from Last Commit(s)](./create-patch-from-last-commit-s.md)
20+
- [Apply Patch with Commit Metadata](./apply-patch-with-commit-metadata.md)
21+
- [Create Patch from Uncommitted Changes](./create-patch-from-uncommitted-changes.md)
22+
- [Apply Diff File](./apply-diff-file.md)
23+
- [Patch vs Diff: Quick Reference](./patch-vs-diff-quick-reference.md)
24+
1825

1926
---
2027

contents/useful-rare-git-commands-you-never-heard-of.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
A collection of lesser-known but powerful Git commands. Use these to level up your Git workflow!
1313

14+
## Key Topics & Subcommands
15+
- [git replace <old-commit> <new-commit>](./git-replace-old-commit-new-commit.md): Temporarily substitute one commit for another.
16+
1417

1518
---
1619

scripts/generate-readme.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ function conciseMetaLine(author, lastUpdated, tags) {
220220

221221
function generateMiniSubtocTOC(obj) {
222222
if (!obj.subtoc || !obj.subtoc.length) return '';
223-
let out = '## Subcommands\n';
223+
let out = '## Key Topics & Subcommands\n';
224224
obj.subtoc.forEach((sub) => {
225225
out += `- [${sub.Name}](./${slugify(sub.Name)}.md)`;
226226
if (sub.short_description) out += `: ${sub.short_description}`;
@@ -235,10 +235,7 @@ function generateContentFile(obj, idx, tocData) {
235235
md += `# ${obj.Name}\n\n`;
236236
if (obj.category) md += renderCategory(obj.category);
237237
if (obj.short_description) md += `> ${obj.short_description}\n\n`;
238-
// Always add mini-TOC if subtoc exists
239-
if (obj.subtoc && obj.subtoc.length) {
240-
md += generateMiniSubtocTOC(obj);
241-
}
238+
242239
if (obj.long_description) md += `${obj.long_description}\n\n`;
243240
if (obj.command) md += renderCommand(obj.command);
244241
if (obj.flags) md += renderFlags(obj.flags);
@@ -251,6 +248,12 @@ function generateContentFile(obj, idx, tocData) {
251248
if (obj.links) md += renderLinks(obj.links);
252249
if (obj.related_commands) md += renderRelatedCommands(obj.related_commands);
253250
if (obj.output_example) md += renderOutputExample(obj.output_example);
251+
252+
// Always add mini-TOC if subtoc exists
253+
if (obj.subtoc && obj.subtoc.length) {
254+
md += generateMiniSubtocTOC(obj);
255+
}
256+
254257
md += conciseMetaLine(obj.author, obj.last_updated, obj.tags);
255258
return md;
256259
}

0 commit comments

Comments
 (0)