Sync, and the three buttons
Fetch, pull and push in the toolbar, and the one command that works out which of them you meant.
The middle of the toolbar, beside the branch switcher, is three buttons rather
than one.

| Button | What it does |
|---|---|
| Sync with Remote | Fetches. Goes and looks at what the remote has, and changes nothing you are working on. |
| Pull | Brings the remote’s commits into yours. |
| Push | Sends yours to the remote. |
Pull and Push carry a small badge with a number: how many commits
you are behind, and how many you are ahead. The badge is drawn only when the
number is not zero, so a button with nothing beside it has nothing waiting.
Above ninety-nine it reads 99+.
Both numbers are measured against the branch’s upstream: a branch that tracks nothing shows neither.
The command that decides for you
Repository ▸ Sync (⇧⌘S) is the one that works the answer out from the two counts:
| Ahead | Behind | What Sync does |
|---|---|---|
| 0 | 0 | Fetch — there is nothing to move, so it goes and looks. |
| some | 0 | Push. |
| 0 | some | Pull. |
| some | some | Both, in that order. |
It is a command rather than a fourth button, which means nothing on screen announces which of the four it is about to be. You will find it in the Repository menu, in the Command Palette, and in the menu bar extra.
What Sync does when it is both
It integrates first and pushes second, and it only pushes if the integration came out clean:
- Fetch.
- Integrate the remote’s commits into yours — see safe pull for how.
- If there are no conflicts, push.
If step 2 conflicts, it stops there. Pushing a half-resolved merge is not something anyone means to do, so it does not happen by accident.
Individual operations
Fetch, pull and push are all separately available — the three buttons above, and Repository ▸ Fetch, Repository ▸ Pull and Repository ▸ Push in the menu bar — for when you want exactly one of them.
The status bar
The right-hand end of the status bar repeats the same state in a smaller space: the current branch as plain text, then a button carrying the number of changed files, which jumps to the working copy. When you are behind or ahead, a pull and a push control appear after it, showing the same counts as the toolbar badges and doing the same thing.
While a merge or rebase is under way those two are replaced by Continue and Abort, because that is the decision in front of you.