Ninja Builder Sign in Get started

Git panel

Ninja Builder has a full Git client built in (More › Git graph): see the history and every change, commit with an AI-written message, push, and work with branches, tags, stashes and pull requests. This page covers: history, commits, branches, tags, stashes and pull requests in the built-in Git window.

8 topics · 13 min read

On this page

Don't see the Git button? It's in the top bar's More menu (⋯), or press ⌘K / Ctrl+K and type Git.

The Git button shows in every project folder. If the folder isn't using Git yet, the Git window offers Start Git here (makes it a Git repository) or Clone a repository….

See history and commit changes

A full source control view for the session's folder: a history graph with branches, changed files, and diffs.

Where the top bar's More (⋯) › Git graph.

How to use it

  1. Changed files show at the top of the history. Click a file to see what changed.
  2. Stage the files you want, write a message (or click Write with AI), and click Commit.
  3. Use Pull and Push to sync with the remote. The Git window also fetches by itself when you open it and every 5 minutes while it's open, so branches your teammates push show up on their own. It also checks for changes every 5 seconds, so there's no refresh button.

Write the commit message with AI

Writes the commit message for you from the files you staged. You get a short first line in the usual commit style (for example "feat(checkout): pay with a saved card in one tap") and a few bullets saying what changed. The AI picks the kind of change (new feature, fix, docs, tidy-up…); you don't need to know the format.

Where Git windowCommit, the Write with AI button inside the empty message box.

How to use it

  1. Stage the files you want to commit.
  2. Click Write with AI. It takes a few seconds; the button shows it's working.
  3. The message appears in the box. Edit it freely, or click Rewrite under the box for a new one.
  4. Click Commit or Commit & Push as usual. Nothing is committed until you click.

The toolbar

The buttons at the top of the Git window. Each one has its name above an icon. A button that can't do anything right now is dimmed; point at it to see why.

Where the top of the Git window, from left to right: Undo, Redo, Pull (with a small ▾ next to it), Push, Branch, Stash, Pop, then Commit.

  • Undo takes back the last thing you did in the Git window. Redo does it again. Point at either to see what it will do, for example "Undo commit 'Fix header'".
  • Pull gets the remote's new commits. Click the ▾ next to it to choose what Pull does; your choice is remembered.
  • Push sends your commits to the remote. A number on Pull or Push shows how many commits there are to pull or push.
  • Branch makes a new branch and switches to it.
  • Stash sets all your uncommitted changes aside (it's dimmed when nothing has changed). Pop brings back the newest stash and removes it from the list (it's dimmed when there are no stashes).
  • Commit opens the changed files and the commit message.

Choose what Pull does (click the ▾ next to Pull)

  • Fetch All: gets the news from every remote without changing your files.
  • Pull (fast-forward if possible): moves your branch forward, or makes a merge commit when both sides have new commits.
  • Pull (fast-forward only): the default. Only moves your branch forward and never makes a merge commit. If both sides have new commits, it says so and changes nothing.
  • Pull (rebase): puts your new commits on top of the remote's. If that hits a conflict, nothing changes and you're told to use the merge option instead.

What Undo can take back

  • A commit: its changes come back staged, ready to commit again.
  • Switching branches: you go back to the branch you were on.
  • Making a branch: the branch is deleted again, and you go back to the branch you were on.
  • Deleting a branch: the branch comes back where it was.
  • Stash: the stash is popped back into your changes. Pop: the changes go back into a stash.
  • A merge: your branch goes back to where it was before the merge.
  • Discard changes on a file: the discarded text comes back.

Messages from the Git window (pushed, pulled, a failed action) slide down over the top of the commit list and slide away again. Errors stay until you close them.

Errors say in one plain line what went wrong and what to do (for example "The remote has changes you don't have yet. Pull first, then push."). Git's own message is under Details, to copy into a bug report. Sign-in problems in SettingsAccounts and connection problems in SettingsConnections work the same way.

Right-click a staged or unstaged file for more

  • Stage or Unstage, and Discard changes (asks first; Undo at the top brings the changes back).
  • Ignore: adds the file, all files of that type, or its folder to .gitignore. A file git already tracks also stops being tracked; your copy stays on disk.
  • Stash file: sets just this file's changes aside.
  • File History lists the commits that changed it; click one to see that change. File Blame shows who last changed each line and when; click a name to open that commit.
  • Open in external diff tool, Open in external editor, Open file in default program, and Show in Finder. The diff tool is the one in your global git settings (diff.tool), otherwise VS Code. The editor is VS Code, or your default program if it isn't installed.
  • Copy file path.
  • Create patch from file changes: saves a .patch file to Deliverables.
  • Edit file opens it here. Delete file removes it from disk (asks first).

Work with branches

How to use it

  1. Click Branch at the top to make a new branch.
  2. Click a branch to jump to its commit: the graph scrolls there and the commit and the branch's label light up for a few seconds. If the branch is older than the history shown, the graph loads older commits first. Right-click a branch for more: check out, pull, push, set upstream, create branch here, merge into current, rename, delete, and copy its name, commit or link.
  3. Drag a branch onto a local branch to merge it. If there are conflicts, a bar helps you resolve them and continue.

Mark a version with a tag

A tag puts a lasting name, like v1.2.0, on one commit, so you can find that version again later. A plain tag is just the name. An annotated tag also holds a message and records who made it and when.

Where right-click a commit in the history, or a branch in the left column (local or remote) › Create tag here… or Create annotated tag here…. You can also click a commit and use Add tag… in its details on the right. Your tags are listed under TAGS in the left column, newest first.

How to use it

  1. Right-click the commit or branch and choose Create tag here… or Create annotated tag here….
  2. Type a name, for example v1.2.0. Names can't contain spaces or characters like ~ ^ : ? * [. You're told right away if a name doesn't work or is already used.
  3. For an annotated tag, write a message saying what the tag marks.
  4. To share the tag straight away, switch on Push to origin.
  5. Click Create tag, or press ⌘+Enter (Ctrl+Enter on Windows).

To work with a tag, right-click it in TAGS or on a commit, or click the ⋯ that appears when you point at it in TAGS:

  • Show commit: jumps to the tagged commit.
  • Copy tag name.
  • Push the tag, or push all tags, to the remote. Push all asks first and says how many tags it will send. It sends every tag on this computer, so a tag someone deleted on the remote comes back there.
  • Delete the tag on this computer, or delete it on the remote. Each delete asks first.

Stashes

A stash sets changes aside without committing them, so you can switch to something else and bring them back later. Stashes are listed under STASHES in the Git window's left column, with their message, branch and age.

Where the Stash and Pop buttons at the top of the Git window, and the STASHES section in its left column.

How to use it

  1. To stash all your uncommitted changes (new files too), click Stash at the top. To bring the newest stash back, click Pop at the top.
  2. To stash one file, right-click it in the changed files and choose Stash file.
  3. To stash several files, hold ⌘ (Ctrl on Windows) and click each one, or Shift-click to select a range, then right-click one of them and choose Stash N files.
  4. Click a stash to see the files it holds on the right; click a file to see its changes.
  5. To bring a stash back, click Apply (the stash stays in the list) or Pop (it's removed once its changes are back). Right-click a stash, or click its ⋯, for the same actions.
  6. Edit message renames a stash. Delete removes it for good, after asking.

Pull requests

Lists the open pull requests of the project's GitHub repository, shows one pull request's details and its checks, and opens a new pull request from a branch.

Where the PULL REQUESTS section in the Git window's left column; Open PR in the Git window's toolbar (after Push); Open pull request in the side column › ActivityBranch; and right-click a branch › Create pull request….

How to use it

  1. Open the Git window. PULL REQUESTS lists each open pull request: its number and title, who opened it, which branch goes into which, and whether it's a draft.
  2. Click a pull request to see its description, whether its checks passed, failed or are still running, and a View on GitHub link.
  3. To open a new one for the branch you're on, click Open PR in the toolbar (or Open pull request in ActivityBranch). The Create pull request window opens with the title and description already written by AI from the branch's commits: what changes, and how to test it. Edit them freely or click Rewrite (bottom left) for new ones. Change the base under Into if it isn't main, switch on Draft if it isn't ready for review, and click Create pull request.
  4. On a branch that already has a pull request, the button reads PR #123 (in ActivityBranch: View pull request #123) and opens that pull request's details instead.
  5. For another branch, right-click it and choose Create pull request…. Its title is the branch's last commit; click Rewrite to have AI write the title and description.

Close the Git window

How to use it: press Esc, click ×, or click the dimmed area around the window.