- Node.js (v18 or higher)
- npm (comes with Node.js)
- VS Code (v1.75 or higher)
cd git_helpers/vscode
npm installnpm run compileThis will compile the TypeScript source files in src/ to JavaScript in the out/ directory.
To run the extension in development mode:
- Open the
git_helpers/vscodefolder in VS Code - Press
F5or go to Run → Start Debugging - This will open a new VS Code window with the extension loaded
- In the new window, open a git repository
- Press
Ctrl+Shift+Pand type "Git QuickOps" to see all commands
To automatically recompile on file changes:
npm run watchKeep this running in a terminal while developing.
To create a .vsix file for installation or publishing:
# Install vsce globally (one-time)
npm install -g @vscode/vsce
# Package the extension
vsce packageThis will create a .vsix file (e.g., git-quickops-1.0.0.vsix) that can be installed in VS Code.
To install the packaged extension:
- In VS Code, press
Ctrl+Shift+P - Type "Extensions: Install from VSIX"
- Select the
.vsixfile - Reload VS Code when prompted
After installation, test the extension:
- Open a git repository in VS Code
- Press
Ctrl+Shift+P(orCmd+Shift+Pon macOS) - Type "Git QuickOps: Show Main Menu"
- You should see the main menu with all categories
- Make sure you compiled the TypeScript:
npm run compile - Check the Output panel (Help → Toggle Developer Tools → Console) for errors
- Ensure git is installed:
git --version - Make sure you're in a git repository
- Try removing
node_modulesand reinstalling:rm -rf node_modules && npm install - Ensure you have TypeScript 5.x:
npm list typescript
git_helpers/vscode/
├── src/
│ ├── extension.ts # Main extension logic and commands
│ └── gitUtils.ts # Git utility functions
├── out/ # Compiled JavaScript (generated)
├── node_modules/ # Dependencies (generated)
├── .vscode/
│ ├── launch.json # Debug configuration
│ └── tasks.json # Build tasks
├── package.json # Extension manifest and dependencies
├── tsconfig.json # TypeScript configuration
├── .eslintrc.js # ESLint configuration
├── .vscodeignore # Files to exclude from VSIX
├── .gitignore # Git ignore rules
└── README.md # User documentation
- Make changes to
src/extension.tsorsrc/gitUtils.ts - Compile:
npm run compile(or use watch mode) - Press
F5to test in Extension Development Host - Debug using breakpoints in VS Code
- Check console for errors
To publish to VS Code Marketplace:
- Create a Personal Access Token with Marketplace access
- Create a publisher account
- Update
publisherinpackage.json - Run:
vsce publish
- Test all commands thoroughly
- Customize the commit prefix templates
- Add keyboard shortcuts if desired (update
package.json→contributes.keybindings) - Consider adding icons for better visual appeal
For issues or questions, please visit: https://github.com/kumpeapps/helper_scripts