Sourcetree Keyboard Shortcuts
Sourcetree's entire value proposition is showing Git's underlying structure — commits, branches, merges — as a visual graph rather than log output, so its shortcuts are built to keep you interacting with that graph and the staging area quickly rather than typing raw git commands. Commit (Ctrl/Cmd+Return from the commit message box) is the single most-used shortcut for anyone using Sourcetree day to day, since committing staged changes with a message is the most repeated action in any Git workflow regardless of which interface you're using. Because Sourcetree displays a visual list of changed files with individual stage/unstage checkboxes rather than requiring typed git add commands, its file-staging shortcuts (stage selected, stage all) serve the same purpose as git add -p or git add . but through a visual selection model, which is the whole reason people choose a GUI client over the CLI for staging in the first place. Interactive rebase, accessible through Sourcetree's visual interface rather than the CLI's text-based todo list, lets you reorder, squash, or edit commits in a branch's history through drag-and-drop, which some users find considerably more approachable than editing a rebase todo file directly in a text editor. Because Sourcetree is free and built by Atlassian specifically to lower the barrier to Git adoption, it remains a common recommendation for developers newer to version control who want to understand what's actually happening to their commit graph before committing fully to CLI-only workflows.
Staging Committing
| Action | Windows | Mac | Description |
|---|---|---|---|
| Commit staged changes | Ctrl+Return (in commit message box) | Cmd+Return | Turns the currently staged changes into a commit using whatever message was typed, the action you'll repeat more than any other in a Sourcetree session simply because committing sits at the center of a normal Git workflow. |
| Stage all changed files | Ctrl+A (in unstaged files list) then Stage | Cmd+A | Selects and stages every changed file shown in the unstaged files list, the GUI equivalent of running git add . from the command line. |
| Push commits to remote | Ctrl+Shift+P | Cmd+Shift+P | Pushes local commits to the configured remote repository, prompting for branch and remote selection if not already clearly determined by the current branch's tracking configuration. |
| Stash uncommitted changes | Ctrl+Shift+S | Cmd+Shift+S | Temporarily shelves uncommitted changes so the working directory returns to a clean state, retrievable later, useful for quickly switching branches without committing half-finished work. |
| Pull from remote | Ctrl+Shift+L (varies) | Cmd+Shift+L | Brings down whatever is new on the tracked remote branch and integrates it into your current local branch, using merge or rebase according to however that branch is configured. |
Branching
| Action | Windows | Mac | Description |
|---|---|---|---|
| Create new branch | Ctrl+Shift+N | Cmd+Shift+N | Opens the new branch dialog, letting you name a new branch and choose its starting point before switching to it. |
| Checkout selected branch | Double-click branch in sidebar | — | Moves the working directory over to the selected branch with a click, standing in for typing git checkout <branch> at a terminal. |
| Merge branch into current | Right-click branch > Merge | — | Merges the selected branch into whichever branch is currently checked out, with Sourcetree visually representing the resulting merge in the commit graph afterward. |
History Graph
| Action | Windows | Mac | Description |
|---|---|---|---|
| Refresh commit history graph | F5 | Cmd+R | Re-reads the repository's current state and redraws the visual commit graph, useful after changes made outside Sourcetree (like a CLI commit) that haven't automatically reflected yet. |
| Search commit history | Ctrl+F | Cmd+F | Searches through commit messages, authors, or SHA hashes in the visual history graph, useful for finding a specific commit without scrolling through potentially thousands of entries. |
| Start an interactive rebase | Right-click commit > Rebase children of | — | Opens Sourcetree's visual interface for reordering, squashing, or editing commits in a branch's history through drag-and-drop, generally considered more approachable than manually editing a rebase todo file in a text editor. |
Frequently Asked Questions
Does Sourcetree replace needing to know Git commands, or just wrap them visually?
Sourcetree handles the vast majority of everyday Git operations (commit, branch, merge, push, pull) through its visual interface without requiring you to type any commands, but it's still built on top of standard Git, so understanding underlying Git concepts (like what a merge conflict actually represents) remains valuable even when using the GUI exclusively.
Why does my commit graph look tangled with many crossing lines?
This typically reflects the actual branching and merging history of the repository rather than a Sourcetree rendering issue — frequent branching, especially with many short-lived feature branches merged back irregularly, naturally produces a visually complex graph, which is one of the reasons some teams adopt stricter merge strategies (like rebase-and-fast-forward) specifically to keep history more linear and readable.
Is Sourcetree free, and does it work with GitHub, GitLab, and Bitbucket equally well?
Sourcetree is free from Atlassian and works with any standard Git remote regardless of hosting provider, though it has particularly smooth built-in integration with Bitbucket (also an Atlassian product) for things like account authentication, while GitHub and GitLab repositories work over standard Git protocols without that same first-party integration depth.
Is interactive rebase easier in Sourcetree than using the Git CLI directly?
Many users find Sourcetree's drag-and-drop interface for reordering, squashing, or editing commits more approachable than manually editing a text-based rebase todo list in a terminal editor, though the underlying Git operation being performed is identical regardless of which interface is used.
What happens to stashed changes if I switch branches?
Stashed changes are stored independently of any specific branch and remain available to reapply later regardless of which branch you're currently on, though applying a stash back onto a significantly different branch state can occasionally produce conflicts that need manual resolution.
Why is Sourcetree often recommended to people newer to Git specifically?
Because it visualizes the commit graph and staging process directly rather than requiring memorized CLI commands upfront, Sourcetree is commonly recommended as a way to build an accurate mental model of what Git is actually doing before committing fully to a CLI-only workflow, which some newcomers find considerably less intimidating.
Does Sourcetree support Git LFS for large binary files?
Yes, Sourcetree includes support for Git LFS (Large File Storage), letting teams version large binary assets like design files or media without bloating the core repository the way committing them directly would.
Can Sourcetree show a visual diff between two specific commits, not just adjacent ones?
Yes, selecting any two commits in the history graph and choosing to compare them shows the combined diff between those two points, not just changes between immediately adjacent commits, which is useful for reviewing everything that changed across a whole feature branch at once.
Does Sourcetree have a shortcut for stashing uncommitted changes quickly?
Yes — Ctrl+Shift+S (Cmd+Shift+S on Mac) opens the Stash dialog for the current repository, letting you set aside uncommitted work temporarily without committing it, useful when you need to quickly switch branches to address something urgent without losing in-progress changes.