VS Code Git and Productivity

Daily Git workflows, compare views, merge conflicts, and general productivity patterns inside VS Code.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Source Control Basics

Clone repository

Clone via built-in Git command.

textANYgitclone
text
Command Palette: Git: Clone

Open file diff from Source Control

Review changed files directly in diff view.

textANYgitdiff
text
Open Source Control view and click a changed file

Stage selected ranges

Stage only part of a file from the diff editor.

textANYgitstaging
text
Select lines in diff editor and use Stage Selected Ranges

Sync changes

Pull and push using the status bar sync action.

textANYgitsync
text
Status bar sync action or Command Palette: Git: Sync

Compare and Merge Conflicts

Select for compare / compare with selected

Compare arbitrary files in the explorer.

textANYcomparediff
text
Explorer context menu: Select for Compare, then Compare with Selected

Use merge conflict actions

Accept current, incoming, or both changes inline.

textANYgitmergeconflicts
text
Open conflicted file and use the conflict action buttons in the editor

Open Timeline view

See file history and source control timeline.

textANYgithistory
text
Explorer / file view: Timeline panel

Productivity Patterns

Split editor

Work with multiple files side by side.

textANYlayoutproductivity
text
Windows/Linux: Ctrl+\
macOS: Cmd+\

Keep editor open

Pin an editor to stop it from being replaced by preview opens.

textANYtabsproductivity
text
Double-click a tab or use Keep Open

Open keyboard shortcuts

Customize or inspect shortcuts.

textANYshortcutsproductivity
text
Windows/Linux: Ctrl+K Ctrl+S
macOS: Cmd+K Cmd+S

Recommended next

No recommendations yet.