Skip to content

Commit 44a3db2

Browse files
feat: add full advanced managers (Stash, Tag, Merge, Rebase, Conflict)
1 parent 0387db9 commit 44a3db2

File tree

8 files changed

+1052
-2
lines changed

8 files changed

+1052
-2
lines changed

src/config/commandsList.ts

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,4 +446,210 @@ export const COMMANDS_LIST: PlainGitCommand[] = [
446446
description: 'Select reset type interactively from a menu.',
447447
handler: 'ResetManager.interactiveReset',
448448
},
449+
450+
// 🎒 Stash Operations
451+
{
452+
category: 'Stash',
453+
name: '🎒 Stash current changes',
454+
command: 'git stash push',
455+
description: 'Save current uncommitted changes into a stash.',
456+
handler: 'StashManager.createStash',
457+
},
458+
{
459+
category: 'Stash',
460+
name: '📜 List all stashes',
461+
command: 'git stash list',
462+
description: 'Show saved stash entries.',
463+
handler: 'StashManager.listStashes',
464+
},
465+
{
466+
category: 'Stash',
467+
name: '◀️ Apply a stash',
468+
command: 'git stash apply <stash>',
469+
description: 'Apply a stash but keep it.',
470+
handler: 'StashManager.applyStash',
471+
},
472+
{
473+
category: 'Stash',
474+
name: '⬆️ Pop a stash (apply + delete)',
475+
command: 'git stash pop <stash>',
476+
description: 'Apply and remove a stash entry.',
477+
handler: 'StashManager.popStash',
478+
},
479+
{
480+
category: 'Stash',
481+
name: '❌ Drop a stash',
482+
command: 'git stash drop <stash>',
483+
description: 'Delete a specific stash entry.',
484+
handler: 'StashManager.dropStash',
485+
},
486+
{
487+
category: 'Stash',
488+
name: '🧹 Clear all stashes',
489+
command: 'git stash clear',
490+
description: 'Remove all stash entries.',
491+
handler: 'StashManager.clearStashes',
492+
},
493+
494+
// 🏷️ Tag Operations
495+
{
496+
category: 'Tag',
497+
name: '📜 List all tags',
498+
command: 'git tag --list',
499+
description: 'Show all tags in the repository.',
500+
handler: 'TagManager.listTags',
501+
},
502+
{
503+
category: 'Tag',
504+
name: '🏷️ Create a tag',
505+
command: 'git tag <tag>',
506+
description: 'Create a lightweight tag.',
507+
handler: 'TagManager.createTag',
508+
},
509+
{
510+
category: 'Tag',
511+
name: '📝 Create an annotated tag',
512+
command: "git tag -a <tag> -m '<message>'",
513+
description: 'Create a tag with a message and metadata.',
514+
handler: 'TagManager.createAnnotatedTag',
515+
},
516+
{
517+
category: 'Tag',
518+
name: '🔍 Show tag details',
519+
command: 'git show <tag>',
520+
description: 'Show commit details behind a tag.',
521+
handler: 'TagManager.showTagDetails',
522+
},
523+
{
524+
category: 'Tag',
525+
name: '❌ Delete a tag',
526+
command: 'git tag -d <tag>',
527+
description: 'Delete a tag locally.',
528+
handler: 'TagManager.deleteTag',
529+
},
530+
{
531+
category: 'Tag',
532+
name: '☁️ Push all tags',
533+
command: 'git push --tags',
534+
description: 'Push all local tags to the remote repository.',
535+
handler: 'TagManager.pushTags',
536+
},
537+
{
538+
category: 'Tag',
539+
name: '☁️ Push a specific tag',
540+
command: 'git push origin <tag>',
541+
description: 'Push only the selected tag to the remote.',
542+
handler: 'TagManager.pushSingleTag',
543+
},
544+
545+
// 🔀 Merge Operations
546+
{
547+
category: 'Merge',
548+
name: '🔀 Merge a branch into current',
549+
command: 'git merge <branch>',
550+
description: 'Merge another branch into the current branch.',
551+
handler: 'MergeManager.mergeBranch',
552+
},
553+
{
554+
category: 'Merge',
555+
name: '⚠️ Show merge conflicts',
556+
command: 'git diff --name-only --diff-filter=U',
557+
description: 'List files that have merge conflicts.',
558+
handler: 'MergeManager.showConflicts',
559+
},
560+
{
561+
category: 'Merge',
562+
name: '🛑 Abort the current merge',
563+
command: 'git merge --abort',
564+
description: 'Abort the merge process due to conflicts.',
565+
handler: 'MergeManager.abortMerge',
566+
},
567+
{
568+
category: 'Merge',
569+
name: '▶️ Continue merge',
570+
command: 'git merge --continue',
571+
description: 'Continue the merge after resolving conflicts.',
572+
handler: 'MergeManager.continueMerge',
573+
},
574+
575+
// 🔁 Rebase Operations
576+
{
577+
category: 'Rebase',
578+
name: '🔁 Rebase current branch onto another',
579+
command: 'git rebase <branch>',
580+
description: 'Replay current branch commits on top of another branch.',
581+
handler: 'RebaseManager.startRebase',
582+
},
583+
{
584+
category: 'Rebase',
585+
name: '✏️ Interactive rebase (edit history)',
586+
command: 'git rebase -i HEAD~<n>',
587+
description: 'Interactively edit, squash, or reorder commits.',
588+
handler: 'RebaseManager.interactiveRebase',
589+
},
590+
{
591+
category: 'Rebase',
592+
name: '▶️ Continue rebase',
593+
command: 'git rebase --continue',
594+
description: 'Continue rebase after conflicts are resolved.',
595+
handler: 'RebaseManager.continueRebase',
596+
},
597+
{
598+
category: 'Rebase',
599+
name: '⏭ Skip current commit',
600+
command: 'git rebase --skip',
601+
description: 'Skip the commit that is causing merge conflicts.',
602+
handler: 'RebaseManager.skipCommit',
603+
},
604+
{
605+
category: 'Rebase',
606+
name: '🛑 Abort rebase',
607+
command: 'git rebase --abort',
608+
description: 'Abort the entire rebase process.',
609+
handler: 'RebaseManager.abortRebase',
610+
},
611+
{
612+
category: 'Rebase',
613+
name: '⚠️ Show rebase conflicts',
614+
command: 'git diff --name-only --diff-filter=U',
615+
description: 'Show files with conflicts during rebase.',
616+
handler: 'RebaseManager.showConflicts',
617+
},
618+
619+
// ⚔️ Conflict Operations
620+
{
621+
category: 'Conflict',
622+
name: '⚠️ List conflicting files',
623+
command: 'git diff --name-only --diff-filter=U',
624+
description: 'Show files that currently contain merge conflicts.',
625+
handler: 'ConflictManager.listConflicts',
626+
},
627+
{
628+
category: 'Conflict',
629+
name: '📄 Inspect conflict markers',
630+
command: 'Open file and inspect conflict markers',
631+
description: 'Show HEAD and incoming changes inside a file.',
632+
handler: 'ConflictManager.inspectConflict',
633+
},
634+
{
635+
category: 'Conflict',
636+
name: '🧭 Open conflict in VS Code',
637+
command: 'code <file>',
638+
description: 'Open conflicting file directly in VSCode.',
639+
handler: 'ConflictManager.openInEditor',
640+
},
641+
{
642+
category: 'Conflict',
643+
name: '🔍 Show diff of a conflict file',
644+
command: 'git diff <file>',
645+
description: 'View what changed inside the conflict.',
646+
handler: 'ConflictManager.showConflictDiff',
647+
},
648+
{
649+
category: 'Conflict',
650+
name: 'ℹ️ How to resolve conflicts (guide)',
651+
command: 'Explain how to resolve Git conflicts',
652+
description: 'Shows a step-by-step guide for resolving conflicts.',
653+
handler: 'ConflictManager.conflictHelp',
654+
},
449655
];

src/core/registry/ManagerMap.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* -------------------------------------------------------------
77
*/
88

9-
import {RepositoryManager, BranchManager, CommitManager, RemoteManager, HistoryManager, ResetManager} from '../../managers'
9+
import {RepositoryManager, BranchManager, CommitManager, RemoteManager, HistoryManager, ResetManager, StashManager, TagManager, MergeManager, RebaseManager, ConflictManager} from '../../managers'
1010

1111
export const managerMap: Record<string, any> = {
1212
RepositoryManager,
@@ -15,4 +15,9 @@ export const managerMap: Record<string, any> = {
1515
RemoteManager,
1616
HistoryManager,
1717
ResetManager,
18+
StashManager,
19+
TagManager,
20+
MergeManager,
21+
RebaseManager,
22+
ConflictManager
1823
};

0 commit comments

Comments
 (0)