Inspired by the TortoiseGit Toolbar Visual Studio extension, this extension provides commands for launching common TortoiseGit dialogs from within Visual Studio Code.
You can execute these commands either by searching for TGit
in the Command Palette (Ctrl+Shift+P
), or via keyboard shortcuts.
Global shortcuts:
(G)it (C)ommit
- Ctrl+G, Ctrl+C(G)it (F)etch
- Ctrl+G, Ctrl+F(G)it (L)og
- Ctrl+G, Ctrl+L(G)it (M)erge
- Ctrl+G, Ctrl+M(G)it (P)ull
- Ctrl+G, Ctrl+P(G)it P(u)sh
- Ctrl+G, Ctrl+U(G)it (R)ebase
- Ctrl+G, Ctrl+R(G)it Re(v)ert
- Ctrl+G, Ctrl+V(G)it Stash-L(i)st
- Ctrl+G, Ctrl+I(G)it Stash-P(o)p
- Ctrl+G, Ctrl+O(G)it Stash-S(a)ve
- Ctrl+G, Ctrl+A(G)it (S)witch
- Ctrl+G, Ctrl+S(G)it S(y)nc
- Ctrl+S, Ctrl+Y(G)it Clea(n)up
- Ctrl+G, Ctrl+N(G)it Repository (D)iff
- Ctrl+G, Ctrl+DCurrent file shortcuts:
(G)it R(e)solve
- Ctrl+G, Ctrl+E(G)it File (L)og
- Ctrl+Shift+Alt+G, Ctrl+Shift+Alt+L(G)it File (B)lame
- Ctrl+Shift+Alt+G, Ctrl+Shift+Alt+B(G)it File (D)iff
- Ctrl+Shift+Alt+G, Ctrl+Shift+Alt+DBisect commands are also available, but with no preset shortcuts.
To customize shortcuts go to File -> Preferences -> Keyboard Shortcuts.
Since the default shortcuts will make Ctrl+G (Go To Line) inaccessible, you can change them, or just change the one for "Go To Line" to be e.g. Ctrl+G, Ctrl+G:
{ "key": "Ctrl+g Ctrl+g", "command": "workbench.action.gotoLine" }
This extension contributes the tgit.launcherPath
setting, specifying the full path to TortoiseGitProc.exe
.
It is set to the default installation path of TortoiseGit, so you might need to adjust it if you installed elsewhere.
npm install
in the checkout directory to install dependenciesF5
to open a new VSCode window with the extension loadedCtrl+Shift+P
and typing tgit
src/extension.ts
to debug the extensionsrc/extension.ts
Ctrl+R
to reload the VS Code window with the extension to load any changesHere's to productivity!