What this guide covers
When you finish, the project builds and runs on the remote Mac, and all your work can get back to your own repository. You need: the project already under git, and a remote Mac that can already reach your repository.
Steps
Tidy up locally and push first
Run
git statuson your own computer, commit what should be committed, add what should be ignored to.gitignore, thengit push. If you do not want half-finished work on the main branch, push it to a temporary branch. The principle: anything worth keeping goes into the repository first. Zipping the whole folder and sending it over looks easier, but it drags along dependency directories, caches and system-specific build artifacts, most of which will not work on a different machine.Clone on the remote Mac
In the remote Mac's terminal, run
git clone <repository URL>. Keep all projects in one fixed place under your user directory (for example~/code), so they are easy to find when you check disk usage or make backups. Do not put them on the Desktop or in Downloads, and do not put them in a folder that iCloud syncs: a sync process and build tools reading and writing the same files at the same time tends to cause problems.Four kinds of things git does not carry
Handle them one by one:
- Secrets and
.env: do not copy them. Issue new ones on the remote machine and fill them in again. - Dependency directories (
node_modules, virtual environments and so on): do not copy them. Reinstall from the lock file. - Local databases and test data: export to files, put them in your own cloud storage, then download and import on the remote machine.
- Large files and assets: use your own cloud storage or Git LFS in the same way.
What we provide is a remote desktop connection. File transfer depends on the remote access client you use and on the instructions in the help center, and it is not suitable as a channel for large volumes of data.
- Secrets and
Align tool versions
Commit version files such as
.nvmrcand.python-versiontogether with the lock files, and install according to them on the remote machine. When something runs locally but not remotely after a migration, the cause is mostly mismatched tool versions. Make a list of globally installed command line tools and write it into the project's README.Differences when coming from a Windows or Intel machine
Three common differences. First, chip architecture: dependencies with native extensions have to be reinstalled on this Apple silicon machine, and you cannot reuse the artifacts from the old machine. Second, filename case: the default macOS file system is case-insensitive, so two files that differ only in case will collide. Third, line endings and the executable permission on scripts: scripts coming from Windows may need
chmod +xand a check of the line ending settings.Run the tests once before starting work
After installing dependencies and filling in environment variables, run a full build and test first and confirm the results match your local ones before handing over to an agent or a long task. Write the steps you did by hand during this migration into a
setup.shor a README and commit it. Next time you switch machines, you just run through it.From here on, treat the remote Mac as a working copy
You back up your own data, and the machine is reclaimed after the rental ends. Build a fixed habit: commit and push after each piece of work, and when an agent does the work, require it to commit on a separate branch. At any moment, ask yourself: if this machine became unavailable right now, what would I lose? The answer should be "nothing". For more, see backing up your data.
FAQ
The repository is large and cloning is slow. What can I do?
Speed depends on the line and its load. You can start with git clone --depth 1 to fetch only recent history and begin working, then run git fetch --unshallow when you need the full history. Run the clone inside a tmux session so that disconnecting the remote desktop does not interrupt it.
Our company code is not on GitHub but on an internal git server. What then?
It depends on whether that server can be reached from the public internet. You may not install a VPN or tunneling tools on this machine to join your internal network. If you really have this need, check with support before ordering whether there is a workable option.
I am changing the same project both locally and remotely. How do I avoid conflicts?
Use a separate branch on each side and merge through the remote repository. Do not use a sync drive to synchronize the same working directory between two machines.
Related
- How to set up git and an SSH key for GitHub on a remote Mac mini
- How to store env vars and API keys for multiple projects on a remote Mac mini
- Do I need to back up the data on a remote Mac mini myself?
- What to do on day one with a rented remote Mac mini
- How to manage Node versions with nvm or fnm on a remote Mac mini
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support