Bring work back from a server¶
Work done on the server does not come to this Mac until you push it, or bring it back. Bring Back from a Machine… brings the server's branches into the repository on this Mac.
- Right-click the folder, or the worktree under Worktrees on Machines ▸ This Mac, choose Bring Back from a Machine…, then select the server.
- Check Folder on ‹server›. It starts at
~/‹name of the folder›. Press Return after you change it. - Choose the branches to bring back. The branch that is checked out on the server is chosen at first. A branch that this Mac does not have is made.
- To bring back the changes that are not committed on the server too, turn on Include uncommitted changes from ‹server›. It is off at first. The changes come back only to a folder that has the same branch checked out, and that folder must have no uncommitted changes.
- Click Bring Back. The sheet says which branches moved forward.
Only the commits that this Mac does not have come back. A branch moves forward only, also in a worktree that has it checked out. A bring back never overwrites work done on this Mac. It stops, and changes nothing, when:
- a branch on this Mac has commits of its own that the server does not have. Merge or rebase on the server, or push and pull, then bring back again;
- a branch that must move is checked out in a folder on this Mac with uncommitted changes. Commit them or remove them, then bring back again.
The source host makes a Git bundle with the commits this Mac does not have and a patch when you include uncommitted changes. This Mac’s host reads them through the control plane. It uses a fast-forward merge for a branch that is checked out.
An agent can use bring_back to bring a branch into the
repository where it works. It names the machine and folder, and can select a branch and
include uncommitted changes. The agent asks you to approve the transfer on its question card.