SyncGitSyncGit provides guarded Git pull, push, and synchronization workflows in the VS Code Source Control sidebar. It checks repository state before changing anything and stops when a situation needs a developer's decision. Created by Muhammad Inam ( Source Control ViewOpen the Source Control sidebar and expand SyncGit. Its toolbar provides Auto Commit, Smart Sync, Smart Pull, Smart Push, Repository Health, and refresh actions. The view shows the current branch, upstream, ahead/behind state, working-tree state, and conflicts. It refreshes automatically when VS Code detects Git repository changes, including checkout, pull, push, commit, and working-tree updates. Commands
The same commands remain available from the Command Palette by searching for Safety RulesAuto Commit is the only SyncGit command that stages files or creates a commit. After you enter a message, it stages all modified, deleted, and untracked files; files ignored by Git remain ignored. Auto Commit never pulls or pushes. SyncGit never force-pushes, resets, cleans untracked files, or resolves conflicts automatically. Smart Pull remains fast-forward only. For diverged history, only Smart Sync can perform a rebase or merge, and only after you choose the strategy. Detached HEAD states, missing upstreams, and conflicts stop with a clear message. If the selected rebase or merge causes conflicts, SyncGit stops before pushing and opens the configured conflict view. Resolve and complete the Git operation manually, then run Smart Sync again. When local changes must be protected during a pull, SyncGit creates a named safety stash including untracked files and restores both the working tree and index afterward. If restoration conflicts, the stash is retained by Git and SyncGit opens the configured conflict view. Requirements
In a multi-root workspace, SyncGit uses the folder containing the active editor. If no editor is active, it uses the first workspace folder. Settings
Use View: Toggle Output, then select SyncGit to inspect operation logs. SyncGit does not log credentials. Install a VSIX
Development
Current Limitations
|