What is the VS Code stage changes
shortcut?
I mean is it possible to stage a selected file without clicking the plus button in the version control tab?
Maybe there is no shortcut an it is somehow possible to setup one?
What is the VS Code stage changes
shortcut?
I mean is it possible to stage a selected file without clicking the plus button in the version control tab?
Maybe there is no shortcut an it is somehow possible to setup one?
git.Stage
and git.StageAll
. They have no keybinding assigned by default. You can assign a custom one in your keyboard shortcut settings. CMDK+CMDS
git.Stage
works on an open file or comparison, not a filename in the SCM view. –
Heredity ctrl+shift+G
up/down arrow keys
spacebar
ctrl+up
spacebar
ctrl+up
Preferences: Open Keyboard shortcuts (JSON) command: workbench.action.openGlobalKeybindingsFile
Then put in the following:
{
"key": "ctrl+up",
"command": "git.stage",
"when": "workbench.scm.active"
}
git.Stage
and git.StageAll
. They have no keybinding assigned by default. You can assign a custom one in your keyboard shortcut settings. CMDK+CMDS
git.Stage
works on an open file or comparison, not a filename in the SCM view. –
Heredity for those who interested in stageAll / unstageAll, you can also do these as well
[
{
"key": "ctrl+up",
"command": "git.stageAll",
},
{
"key": "ctrl+down",
"command": "git.unstageAll",
}
]
I know you are looking for a keyboard shortcut and I was too. However, I have found that the use of the command palette is a much more efficient and cleaner workflow:
I offer this as an alternative if anyone is looking.
© 2022 - 2024 — McMap. All rights reserved.