Haruno Knowledge base

Source control (Git)

The Source control page shows the changes, branches and history of a Git repository in a project's linked folder. In a project it is read only: it shows, but does not stage, commit or switch branches.

  • Mac appNot availableBuilt, but not shown. It needs an open folder, and since 1.3.61 Projects replaced the one open folder.
  • Windows appNot availableBuilt and read only, but its navigation item shows only when Haruno's own working folder for the project is inside a Git repository, which it is not on a normal PC.

Git is the tool many software teams use to keep track of changes to their files. The Source control page shows that record for a folder: what has changed since the last save, which branches exist, and the history of saves (called commits).

It is for people who work in a repository. A repository is a folder that Git is tracking. Most accountants and managers will never need this page.

Where to find it

Source control appears in the navigation pane (Ctrl+G) only when Haruno finds a Git repository in the project's own working folder. Git must be installed on the PC. For almost every customer that folder is not a repository, so the item does not appear.

Like the Files page, it works on the linked folder you pick at the top of the page. See The Files page. If the folder is inside a larger repository, the project menu names that repository and says: "This folder sits inside a Git repository. Changes are limited to the project folder; branches and history come from the repository."

Check this before you promise it

The navigation item is shown according to the project's own working folder, not the linked folder picked on the Files page. Haruno keeps that working folder in its own data area (Local AppData, in a folder called ProjectWorkspaces), and it is not a repository on a normal PC. So the item is hidden in practice. If a customer has a repository linked and cannot see Source control, that is why. Pass it on to the team rather than suggesting a workaround.

Read only in a project

The Changes tab. The commit box and the stage buttons are switched off.
The Source control page on the Changes tab. A notice at the top says Project repositories are read only. A Commit message box and a Commit button are greyed out. The Staged list has staged.ts and the Unstaged list has App.tsx. App.tsx is open in a side-by-side diff with the old line in red and the new line in green.The Source control page on the Changes tab. A notice at the top says Project repositories are read only. A Commit message box and a Commit button are greyed out. The Staged list has staged.ts and the Unstaged list has App.tsx. App.tsx is open in a side-by-side diff with the old line in red and the new line in green.

When the repository belongs to a project's linked folder, the page says Project repositories are read only. You can look at everything. You cannot change anything:

  • Commit message and Commit are switched off.
  • The stage and unstage buttons beside each file are switched off.
  • New branch name, Create branch and Checkout are switched off.

Haruno runs only reading commands against the repository, and takes care that the repository is left exactly as it was.

The in-app User guide says you can commit

The User guide's Source control section describes staging files, committing with a message, creating a branch and checking one out. In a project those controls are switched off. Do not promise a customer that they can commit from Haruno.

The three tabs

Changes, Branches and History. The refresh button at the top right reads the repository again.

Changes

Lists the files that differ from the last commit, in three groups:

  • Staged: ready to go into the next commit.
  • Unstaged: changed, but not yet staged.
  • Untracked: new files Git has not seen before.

Each file shows its name, the folder it is in, and how many lines were added (+) and removed (−). When there are none, the page says No changes.

Select a file to open a side-by-side diff: the old version on the left and the newer one on the right, each side labelled (for an unstaged file, Index and Working tree), with removed lines in red and added lines in green. The button beside the close button makes the diff fill the window. For a binary file the diff says "This is a binary file — no text diff to show."

Branches

The Branches tab. An up arrow with a number means commits not yet shared.
The Branches tab. The Create branch button and the New branch name box are greyed out. The list shows main, the current branch, and feature/web-ui with an up arrow and the number 2, and a greyed Checkout button.The Branches tab. The Create branch button and the New branch name box are greyed out. The list shows main, the current branch, and feature/web-ui with an up arrow and the number 2, and a greyed Checkout button.

A branch is a separate line of work. The tab lists them, marks the current branch, and shows arrows with numbers for commits that are ahead of or behind the shared copy. In a project, Checkout and Create branch are switched off.

History

The History tab: the commits on the left and what the selected one changed on the right.
The History tab. A commit called Merge main by Alex, with the labels HEAD and main, is selected. On the right are its Files changed, App.tsx with one line added and one removed.The History tab. A commit called Merge main by Alex, with the labels HEAD and main, is selected. On the right are its Files changed, App.tsx with one line added and one removed.

Lists commits, newest first, with a line graph, a short code, the message, the author and the date. Labels such as HEAD and branch names show where each branch is. Select a commit to see Files changed, then select a file to see what that commit did to it. With no commits the page says No commits to show.

Limits

  • The Changes tab shows up to 10,000 files. Past that it says how many it is not showing, for example "Showing the first 10,000 changed files. 250 more are not listed, because this folder holds more changes than the panel can show at once."
  • A commit's list of files is also cut at 10,000, and ends with a line such as "250 more changed files are not listed."
  • Very large Git output is cut off and never shown as if it were the whole picture.

When Haruno itself uses Git inside a chat, it is limited to a short list of safe commands.

What to tell a customer

  • On a normal PC the Source control item is not shown. Do not promise it.
  • Source control is a viewer. To commit or switch branches, use Git in a terminal or another tool.
  • It is for repositories. A folder of documents has nothing to show here.
  • Nothing on this page changes the repository.

Last updated · PR #2944 · View this version on GitHub

History (1 version)
  1. Internal knowledge base for staff: site, reader keys, assistant, 197 pages and the PR rule (#2944)
    What changed
    @@ -0,0 +1,85 @@
    +---
    +title: Source control (Git)
    +summary: "The Source control page shows the changes, branches and history of a Git repository in a project's linked folder. In a project it is read only: it shows, but does not stage, commit or switch branches."
    +feature: source-control
    +covers:
    +  - windows-client/haruno-webview/web/src/pages/GitPage.tsx
    +  - windows-client/haruno-webview/web/e2e/git-parity.spec.ts
    +  - windows-client/Haruno.Desktop.ViewModels/GitViewModel.cs
    +  - windows-client/Haruno.Desktop.Services/Projects/ProjectWorkspaceGit.cs
    +  - windows-client/Haruno.Desktop.Services/Projects/ProjectGitReadProcessRunner.cs
    +  - windows-client/Haruno.Desktop.Services/Git/GitOutputParser.cs
    +---
    +
    +Git is the tool many software teams use to keep track of changes to their files. The Source control page shows that record for a folder: what has changed since the last save, which branches exist, and the history of saves (called commits).
    +
    +It is for people who work in a repository. A repository is a folder that Git is tracking. Most accountants and managers will never need this page.
    +
    +## Where to find it
    +
    +**Source control** appears in the navigation pane (Ctrl+G) only when Haruno finds a Git repository in the project's own working folder. Git must be installed on the PC. For almost every customer that folder is not a repository, so the item does not appear.
    +
    +Like the Files page, it works on the linked folder you pick at the top of the page. See [The Files page](/windows/files/files-view/). If the folder is inside a larger repository, the project menu names that repository and says: "This folder sits inside a Git repository. Changes are limited to the project folder; branches and history come from the repository."
    +
    +<Callout variant="warning" title="Check this before you promise it">
    +The navigation item is shown according to the project's own working folder, not the linked folder picked on the Files page. Haruno keeps that working folder in its own data area (Local AppData, in a folder called ProjectWorkspaces), and it is not a repository on a normal PC. So the item is hidden in practice. If a customer has a repository linked and cannot see **Source control**, that is why. Pass it on to the team rather than suggesting a workaround.
    +</Callout>
    +
    +## Read only in a project
    +
    +<Shot src="/m/012be8dde40a-windows-git-readonly-light.png" dark="/m/77b35f387aa7-windows-git-readonly-dark.png" alt="The Source control page on the Changes tab. A notice at the top says Project repositories are read only. A Commit message box and a Commit button are greyed out. The Staged list has staged.ts and the Unstaged list has App.tsx. App.tsx is open in a side-by-side diff with the old line in red and the new line in green." caption="The Changes tab. The commit box and the stage buttons are switched off." />
    +
    +When the repository belongs to a project's linked folder, the page says **Project repositories are read only.** You can look at everything. You cannot change anything:
    +
    +- **Commit message** and **Commit** are switched off.
    +- The stage and unstage buttons beside each file are switched off.
    +- **New branch name**, **Create branch** and **Checkout** are switched off.
    +
    +Haruno runs only reading commands against the repository, and takes care that the repository is left exactly as it was.
    +
    +<Callout variant="warning" title="The in-app User guide says you can commit">
    +The User guide's Source control section describes staging files, committing with a message, creating a branch and checking one out. In a project those controls are switched off. Do not promise a customer that they can commit from Haruno.
    +</Callout>
    +
    +## The three tabs
    +
    +<Ui>Changes</Ui>, <Ui>Branches</Ui> and <Ui>History</Ui>. The refresh button at the top right reads the repository again.
    +
    +### Changes
    +
    +Lists the files that differ from the last commit, in three groups:
    +
    +- **Staged**: ready to go into the next commit.
    +- **Unstaged**: changed, but not yet staged.
    +- **Untracked**: new files Git has not seen before.
    +
    +Each file shows its name, the folder it is in, and how many lines were added (+) and removed (−). When there are none, the page says **No changes**.
    +
    +Select a file to open a side-by-side **diff**: the old version on the left and the newer one on the right, each side labelled (for an unstaged file, **Index** and **Working tree**), with removed lines in red and added lines in green. The button beside the close button makes the diff fill the window. For a binary file the diff says "This is a binary file — no text diff to show."
    +
    +### Branches
    +
    +<Shot src="/m/79680affd015-windows-git-branches-light.png" dark="/m/71e7e4260545-windows-git-branches-dark.png" alt="The Branches tab. The Create branch button and the New branch name box are greyed out. The list shows main, the current branch, and feature/web-ui with an up arrow and the number 2, and a greyed Checkout button." caption="The Branches tab. An up arrow with a number means commits not yet shared." />
    +
    +A branch is a separate line of work. The tab lists them, marks the **current branch**, and shows arrows with numbers for commits that are ahead of or behind the shared copy. In a project, **Checkout** and **Create branch** are switched off.
    +
    +### History
    +
    +<Shot src="/m/6a41580d8d99-windows-git-history-light.png" dark="/m/4a837ea0acbc-windows-git-history-dark.png" alt="The History tab. A commit called Merge main by Alex, with the labels HEAD and main, is selected. On the right are its Files changed, App.tsx with one line added and one removed." caption="The History tab: the commits on the left and what the selected one changed on the right." />
    +
    +Lists commits, newest first, with a line graph, a short code, the message, the author and the date. Labels such as **HEAD** and branch names show where each branch is. Select a commit to see **Files changed**, then select a file to see what that commit did to it. With no commits the page says **No commits to show**.
    +
    +## Limits
    +
    +- The Changes tab shows up to 10,000 files. Past that it says how many it is not showing, for example "Showing the first 10,000 changed files. 250 more are not listed, because this folder holds more changes than the panel can show at once."
    +- A commit's list of files is also cut at 10,000, and ends with a line such as "250 more changed files are not listed."
    +- Very large Git output is cut off and never shown as if it were the whole picture.
    +
    +When Haruno itself uses Git inside a chat, it is limited to a short list of safe commands.
    +
    +## What to tell a customer
    +
    +- On a normal PC the Source control item is not shown. Do not promise it.
    +- Source control is a viewer. To commit or switch branches, use Git in a terminal or another tool.
    +- It is for repositories. A folder of documents has nothing to show here.
    +- Nothing on this page changes the repository.