跳到內容
Oleaflyv0.4.6

Connect GitHub with a device code or a token, publish a project as a new or existing repo, push and pull between machines, and how your token is protected.

本頁內容尚未翻譯。

GitHub sync is optional off-machine backup and multi-computer handoff, built on the real Git repo each project already is. Local commits work without GitHub. When you connect, there is still no Oleafly account in the picture: only your GitHub.

Settings, Integrations, GitHub, then either route:

  • Connect GitHub (recommended): a device-code flow. Oleafly shows a short code, your browser opens github.com/login/device (with a Copy button for the code), you approve, and the app detects it within seconds. The connection requests only the repo and read:user scopes.
  • Personal access token: expand “Advanced: use a personal access token” and paste a PAT if you prefer minting your own credentials.

Once connected, your avatar and username appear in Settings and in the top toolbar’s GitHub menu. Disconnect forgets the token.

The token is stored in an AES-256-GCM encrypted, owner-restricted local file and never handed to the app’s UI layer; the interface only ever learns “connected as @you”. When Git needs to authenticate, the token is injected through an in-memory credential helper, so it never appears in a command line, in .git/config, or in your shell history. Older builds that embedded tokens in remote URLs are cleaned up automatically at startup.

In the Source Control panel, click Publish to GitHub:

  • Create new repository: pick a name (pre-filled from the project), keep Private (recommended) checked or not, and Create and push. Oleafly creates the repo, commits the project’s files, wires up origin, and pushes.
  • Link existing: pick from a searchable list of your repositories (private ones show a lock) and Link and push.

After publishing, the toolbar’s GitHub menu offers Open in GitHub and Copy repository link.

Publishing never commits files that usually hold keys or passwords, such as .env, *.pem, SSH private keys, or credentials.json. They stay in the project folder, unstaged, and the dialog names them. To publish one anyway, stage and commit it yourself in Source Control. Templates like .env.example, public keys, and Keynote .key files are published as usual.

A push uploads the whole history. If a file with one of these names was ever committed, Oleafly lists it and waits for Cancel or Publish anyway before it creates anything on GitHub.

The Source Control panel’s Push and Pull buttons do what they say, against origin on your current branch. Fetch and Sync are in the More Source Control actions menu, and Commit & Push and Commit & Sync are in the menu beside Commit. The ahead/behind indicator (↑ ↓) next to the branch pill tells you when there’s something to push or pull.

Moving a project between two computers with GitHubComputer A publishes the project to a GitHub repository and pushes commits to it. Computer B imports the same repository and pulls. After that, each computer pushes its commits to GitHub and pulls the other's. Both computers keep the full project folder with its own Git history.Computer AProject folderand its .gitGitHubYour repositoryComputer BProject folderand its .gitPublish, PushPullImport, PullPushMoving a project between two computers with GitHubComputer A publishes the project to a GitHub repository and pushes commits to it. Computer B imports the same repository and pulls. After that, each computer pushes its commits to GitHub and pulls the other's. Both computers keep the full project folder with its own Git history.Computer AProject folder and its .gitGitHubYour repositoryComputer BProject folder and its .gitPublish, PushPullImport, PullPush
Each computer keeps a full project with its Git history. GitHub holds the shared copy, and Push and Pull move commits between them.
  1. On machine A: publish the project, work, Push.
  2. On machine B: connect the same GitHub account, then choose Import a project → GitHub and pick the repository. See the import guide. From then on, Pull, work, Push.
  3. Back on A: Pull before you start. The indicator reminds you.

Cover color, main-document choice, and history all travel, because they live in the project folder itself.

Once a remote is set, the More Source Control actions menu has two more items:

  • Change repo re-opens the publish dialog to point origin somewhere else.
  • Unlink removes the remote; the local project and its history are untouched.

If a pull hits a merge conflict, Source Control lists the conflicted files. Choose Use current or Use incoming for each, or edit the file and choose Mark resolved, then Complete merge. Abort merge puts the files back as they were. Push and Pull work on the branch you have checked out, and the branch menu at the top of the panel switches or creates branches. See Git and source control.

Oleafly authenticates HTTPS remotes. Publish sets one up correctly for you.

  • “No remote ‘origin’”: publish first; Push and Pull need a remote.
  • Push rejected because the remote has commits: pull first, then push.
  • “No GitHub token set”: connect in Settings, Integrations, GitHub.

More in the FAQ.

Image preview

AI answers couldn’t load

Try again, or search the documentation.