Master the essential keyboard shortcuts for git, terminal, and VSCode. Work faster, context-switch less, and build better software.
Essential version control commands
git statusCheck what's changed
git add .Stage all changes
git add -pStage changes interactively
git commit -m 'msg'Commit with message
git commit --amendAmend last commit
git pushPush to remote
git pullPull latest changes
git checkout -b nameCreate new branch
git switch branchSwitch to branch
git branch -d nameDelete branch
git log --onelineView commit history
git diffSee unstaged changes
git stashStash current changes
git stash popApply stashed changes
git reset HEAD~1Undo last commit (keep changes)
git rebase -i HEAD~nInteractive rebase last n commits
git cherry-pick hashApply specific commit
git restore fileDiscard file changes
Navigate and edit code faster
Cmd/Ctrl + PQuick file open
Cmd/Ctrl + Shift + PCommand palette
Cmd/Ctrl + Shift + FSearch across files
Cmd/Ctrl + DSelect next occurrence
Cmd/Ctrl + Shift + LSelect all occurrences
Alt + ClickMultiple cursors
Cmd/Ctrl + /Toggle comment
Alt + Up/DownMove line up/down
Shift + Alt + Up/DownCopy line up/down
Cmd/Ctrl + Shift + KDelete line
Cmd/Ctrl + BToggle sidebar
Cmd/Ctrl + `Toggle terminal
Cmd/Ctrl + Shift + EShow explorer
Cmd/Ctrl + Shift + GShow source control
F12Go to definition
Shift + F12Show references
F2Rename symbol
Cmd/Ctrl + SpaceTrigger suggestions
Cmd/Ctrl + Shift + OGo to symbol in file
Cmd/Ctrl + TGo to symbol in workspace
Cmd/Ctrl + K, Cmd/Ctrl + 0Fold all code
Cmd/Ctrl + K, Cmd/Ctrl + JUnfold all code
Command line productivity
Ctrl + CKill current process
Ctrl + ZSuspend current process
Ctrl + DExit shell or EOF
Ctrl + LClear screen
Ctrl + RSearch command history
Ctrl + AMove to line start
Ctrl + EMove to line end
Ctrl + UDelete to line start
Ctrl + KDelete to line end
Ctrl + WDelete previous word
cd -Go to previous directory
!!Repeat last command
!$Use last argument
mkdir -p path/to/dirCreate nested directories
rm -rf dirRemove directory recursively
ls -lahList all files with details
grep -r 'text' .Search text in files
find . -name 'pattern'Find files by name
cat file | grep textPipe output through grep
historyShow command history
alias name='command'Create command alias
Universal keyboard shortcuts
Cmd/Ctrl + CCopy
Cmd/Ctrl + VPaste
Cmd/Ctrl + XCut
Cmd/Ctrl + ZUndo
Cmd/Ctrl + Shift + ZRedo
Cmd/Ctrl + FFind in page
Cmd/Ctrl + SSave file
Cmd/Ctrl + WClose tab/window
Cmd/Ctrl + TabSwitch between tabs
Cmd/Ctrl + Shift + TReopen closed tab
Cmd/Ctrl + NNew file/window
Cmd/Ctrl + ASelect all