# TortoisegitMenu **Repository Path**: xulishow520/tortoisegitmenu ## Basic Information - **Project Name**: TortoisegitMenu - **Description**: tortoisegit menu vscode extension - **Primary Language**: TypeScript - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-24 - **Last Updated**: 2025-12-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # TortoiseGit Menu ![TortoiseGit Menu](https://gitee.com/xulishow520/tortoisegitmenu/blob/main/screenshot.png) A lightweight Visual Studio Code extension that integrates TortoiseGit commands directly into the VS Code context menus. Access all your favorite Git operations from the right-click menu in both the editor and explorer panels. ## Features - Adds TortoiseGit commands to VS Code context menus - Supports all [TortoiseGit commands](https://tortoisegit.org/docs/tortoisegit/tgit-automation.html) - Works with both Windows and WSL environments - No bundled dependencies - leverages your existing TortoiseGit installation ## Prerequisites - [TortoiseGit](https://tortoisegit.org/) must be installed on your system - For WSL support, ensure proper path configuration ## Installation 1. Install TortoiseGit from [https://tortoisegit.org/](https://tortoisegit.org/) 2. Install this extension from the VS Code Marketplace 3. Restart VS Code if necessary ## Usage After installation, you'll see new TortoiseGit menu options when right-clicking: - In the editor area - On files in the explorer panel - On tabs in the editor title area The extension organizes commands into logical submenus: - **Sync**: Pull, Push, Fetch, Sync operations - **Branch**: Switch, Merge, Rebase operations - **Others**: All other TortoiseGit operations ## Configuration The extension provides several configuration options accessible through VS Code settings: | Setting | Description | Default | |---------|-------------|---------| | `TortoisegitButtons.TortoiseDirWindows` | Path to TortoiseGit installation on Windows | `C:\Program Files\TortoiseGit` | | `TortoisegitButtons.AutodetectWsl` | Enable automatic WSL detection | `true` | | `TortoisegitButtons.TortoiseDirWsl` | Path to TortoiseGit installation in WSL | `/mnt/c/program files/tortoisegit` | | `TortoisegitButtons.TortoiseWslHomePrefix` | WSL path prefix for file locations | `\\\\wsl.localhost\\Ubuntu` | To access these settings: 1. Open VS Code Settings (`Ctrl+,`) 2. Search for "TortoiseGit Buttons" ## WSL Support The extension fully supports Windows Subsystem for Linux (WSL): 1. Make sure TortoiseGit is installed on the Windows side 2. Configure the WSL paths in extension settings: - Set `TortoisegitButtons.TortoiseDirWsl` to point to your TortoiseGit installation within WSL filesystem - Adjust `TortoisegitButtons.TortoiseWslHomePrefix` if needed for your specific WSL distribution ## Troubleshooting ### "Cannot find TortoiseGit installation" error 1. Check that TortoiseGit is properly installed 2. Verify the `TortoisegitButtons.TortoiseDirWindows` setting points to your TortoiseGit installation directory 3. Ensure the path includes the `bin\TortoiseGitProc.exe` executable ### Commands not working in WSL 1. Make sure `TortoisegitButtons.AutodetectWsl` is enabled 2. Verify `TortoisegitButtons.TortoiseDirWsl` points to the correct path 3. Check that `TortoisegitButtons.TortoiseWslHomePrefix` matches your WSL setup ### General Issues Enable the output panel to see detailed logs: 1. Open VS Code Output panel (`Ctrl+Shift+U`) 2. Select "tortoisegit-buttons-in-vscode" from the dropdown ## Supported Commands This extension supports all major TortoiseGit operations including: - Commit, Push, Pull, Fetch - Branch operations (Switch, Merge, Rebase) - Stash operations - Log and Blame - Diff and Conflict resolution - Repository status and cleanup - Tag management - Submodule operations - And many more... ## Contributing Contributions are welcome! Feel free to submit issues and pull requests on [Gitee](https://gitee.com/xulishow520/tortoisegitmenu). ## License See [LICENSE.txt](https://gitee.com/xulishow520/tortoisegitmenu/blob/main/LICENSE.txt)