Skip to content

🌿 Git Integration

Version your documents without leaving TickMark β€” a TickMark Pro feature. Open the Source Control panel from Source Control β–Έ Source Control Panel… (βŒƒβŒ˜G), the branch button in the toolbar, or the status-bar indicator.

πŸ“‘ Table of Contents

πŸ” What it shows

  • Current branch chip in the header β€” click it to switch branches or create a new one (branched from where you stand)
  • Changed files β€” added / modified / deleted / untracked, with staged state; the stage icon doubles as the stage/unstage button
  • Colorized diff β€” additions in green, deletions in red, hunk headers in accent; untracked files preview their content as an all-additions patch
  • Recent commits with author and relative time β€” click one to see its full patch

πŸ”€ The workflow

  1. Save your document (⌘S) β€” the panel reads from disk
  2. Source Control β–Έ Source Control Panel… (βŒƒβŒ˜G)
  3. Review the diff for a file (click it in the list)
  4. Click the file's circle icon to stage it β€” or use Stage All / Unstage All above the list
  5. Type a message, Commit (the button counts your staged files). Repositories without their own user.name/user.email use the author set in Settings β–Έ Commit Author β€” the sandbox can't read your ~/.gitconfig

Made a mess? Right-click a file β†’ Discard Changes… reverts it to the last commit (or deletes it, if untracked) β€” after a confirmation, since git can't undo it.

The status bar shows main Β· 3 when three files await attention β€” plus ↑2 ↓1 markers whenever your branch is ahead of or behind its remote.

πŸ”„ Sync with a remote

Add a remote once (any git tool, or your hosting provider's "clone" URL) and the panel gains a Sync row:

  • Fetch β€” updates the remote-tracking state and shows how far you are ahead (unpushed commits) and behind (unpulled commits)
  • Push β€” uploads your commits; the first push on a branch also publishes it and records the upstream, so later pushes are one click
  • Pull β€” updates your files from the remote using a fast-forward only strategy: TickMark edits your documents in place, so it will never create a surprise merge commit. If history has diverged, the panel shows git's error and you resolve the tangle in a full Git client β€” then come back and pull

Private HTTPS remotes on github.com and gitlab.com authenticate with the account you connect below β€” the sandbox can't see your ~/.gitconfig credential helpers, and TickMark never prompts for a password. SSH remotes (git@github.com:…) can't authenticate from the sandboxed app; the panel says so when one fails β€” switch the remote to its HTTPS URL.

πŸ” Accounts: GitHub & GitLab

Connect an account in Settings β–Έ Accounts and TickMark can talk to your private repositories on that host:

  1. Create a personal access token on the host (GitHub: Settings β–Έ Developer settings β–Έ Personal access tokens; GitLab: Preferences β–Έ Access tokens)
  2. Paste it into the host's field and click Validate & Save β€” the token is checked against the host before anything is stored; on success the row reads "Connected as @login" with a Remove button

While connected, every Fetch, Pull, and Push to a matching github.com / gitlab.com remote carries your token automatically for that one git invocation. The token lives in the macOS Keychain (never in .git/config, remote URLs, or any file in your repository) and each host's credential only ever goes to its own host.

πŸš€ Clone & publish

The Source Control menu does the round-trips that used to need a terminal:

  • Clone… β€” paste a repository URL, or pick from your connected account's repo list; choose a parent folder and the clone lands in the Files pane with its README open in a tab
  • Publish to GitHub… / Publish to GitLab… β€” turn the open document's folder into a repository: TickMark initializes it if needed, makes the initial commit when there are none, creates the repository on your account (private by default), and pushes. The repository URL lands on your clipboard
  • Publish as Gist… / Publish as Snippet… β€” send just the active document: it goes out privately (secret gist / private snippet) and its shareable URL is copied to the clipboard

Publishing creates a repository named after the folder (lowercased, spaces to dashes β€” edit the name in the sheet first if you want something else) and never touches a repository that already has an origin remote β€” add extra remotes from your usual git tool instead.

πŸ“‚ Repository root aware

The panel anchors to the repository root, not your document's folder β€” open a note nested three folders deep and everything (paths, diffs, commits) still works relative to the repo.

🌱 Initialize a repository

Not under version control yet? The panel offers Initialize Repository β€” one click creates a repo with a main branch in your document's folder.

Start versioning early

Markdown documents diff beautifully β€” line-oriented text makes Git history genuinely readable. Future-you will thank present-you.

πŸ”§ Under the hood

  • The app drives the system git β€” your existing config, credentials, and remotes all work
  • Everything runs through the App Sandbox against folders you granted
  • git init from the app creates a standard repository; nothing about the repo is TickMark-specific

Scope

The panel covers the individual writing loop: status β†’ diff β†’ stage β†’ commit, plus local branch switching/creation and remote sync (fetch / pull / push over HTTPS). Merges, rebases, and stashes stay in a full Git client by design β€” TickMark never rewrites your history.