While the work was remote, GitHub moved ahead of the Mac. The switch back to local development brings the Mac in step before any work starts on it.
The third article described the switch to remote development. This article covers the switch back: what has to be brought back, how Claude Code is started in the Terminal, and the six steps of the switch.
What has to be brought back
Two things on the Mac are behind:
The local copy of the repository. Branches were merged on GitHub, so the main branch on GitHub is newer than the main branch on the Mac.
The reports folder. Reports written by remote sessions exist only in the reports repository.
The switch back brings both in step, before any work starts on the Mac.
The setup on the Mac
Local development uses the Mac like this:
Claude Code runs in the Terminal app, started inside the folder that holds the repository.
The reports are saved in a folder on the Mac.
Claude, in the chat, reads that folder.
Starting Claude Code in the Terminal
The Terminal app is opened.
The current folder is changed to the repository folder with
cd, followed by the path of the folder. For example:cd work/<repository-name>, where the text in angle brackets stands for the name of the repository's folder. If the folder names are not remembered,lslists the folders in the current location. Return is pressed after each command.The prompt is checked. It shows the name of the folder the Terminal is in. That name must be the repository's.
claudeis typed and Return is pressed.The first time Claude Code runs in a folder, it asks whether to trust the folder. The question shows the folder's path. The path must end with the repository's name. If it shows the home folder or any other folder, the answer is No. Claude Code started in the home folder could see everything in it, and would not find the repository.
A folder that was trusted before is accepted without a question.
The switch back, step by step
Mac on. The Mac is switched on and given a few minutes for iCloud to finish syncing. The drop folder that held files from the iPad is checked in step 6.
"back on the Mac". These words are sent in the chat. Claude lists what waited.
Local housekeeping. Claude writes one message for Claude Code. It is a short task with no branch and no pull request. It asks Claude Code to update the local repository from GitHub (switch to the main branch, pull) and report the commit now at the head of main; to copy every report that exists only in the reports repository into the reports folder on the Mac, without overwriting any file, and report the names and sizes; and to delete nothing. The message is pasted into Claude Code in the Terminal. Claude Code writes its own report in the reports folder, and Claude reads it there.
Postponed checks. Any live check of Production that needed the Mac, and was postponed during the remote work, is done now.
Branches. The developer checks that the finished branches were deleted on GitHub. This was the last step of the remote loop described in the third article. Branches that must be kept, for example one that holds saved work, stay.
Files from the iPad. The drop folder in iCloud Drive is opened on the Mac. Files that came from the iPad during the remote work are moved to their place. An empty folder, or old files, need nothing.
What is not done
Development work with Claude Code is not started on the Mac before the local repository is updated (step 3). Work done on a copy that is behind GitHub leads to two versions of the same file.
Reports are not copied by hand. Claude Code copies them, byte for byte, and checks the copies.
The home folder is never trusted in the Terminal.
Checklist
Local work can begin when all of these are true:
The local repository is on the main branch, at the same commit as GitHub
Every report from the remote work is in the reports folder on the Mac
Claude Code starts in the Terminal inside the repository folder
The postponed checks were done
The iCloud drop folder holds nothing that needs moving
Top comments (0)