Get Help

Work with Git in CAT Studio

When IT keeps your CAT project in a Git repository, CAT Studio has a Git button: pull what others changed, commit and push what you changed, switch to another branch. The basics only; anything beyond them is for IT and their Git tools.

What you need

  • The project in a Git repository. Somebody (usually IT) has cloned the repository to your computer; you open the project file from that folder. CAT Studio does not create or clone repositories.
  • Git on your computer. CAT Studio uses the Git that is installed, with the sign-in it already has: if you can pull and push from that folder outside CAT Studio, you can from CAT Studio too. It looks for Git on the Path first, then where Git for Windows installs itself.

When both are there, the Git button is the first of the project buttons in the top right corner, and its text is the name of the branch you are on. It takes you to the Git page. Git is in the left menu too, whenever the button is there. With no repository or no Git, there is neither. While tests run they are disabled.

Save first

Git sees the files on disk, not what is open in CAT Studio. When the project has changes that are not saved, the Git page shows a note at the top and everything else disabled. Choose Save Project, in the note or among the project buttons, and the page is ready.

Pull what others changed

Each time the Git page is shown, it asks the server in the background whether there is anything new. When there is, Pull shows how many commits wait. A server that wants a sign-in, or no network, means no number; Pull still works.

Choose Pull. When the pull brought changes, CAT Studio reloads the project. Stop ends a pull that is still downloading.

Commit and push what you changed

The list on the left has every file that changed in the repository, not only the project file: a CAT setup is often more than one file. The commit message is under it. Pick a file to see what changed in it on the right. The View button above it sets how the changes are shown, side by side or in one column, and remembers it.

  1. Untick a file you do not want in this commit. All files are ticked each time the Git page is shown.
  2. Write what you changed in Commit message. It is required; its first line is the summary others see.
  3. Choose Commit & Push.

A repository with no server has a Commit button instead, and the commits stay on your computer. When Git refuses, for example because the server has commits you do not have yet, the page shows what Git said. Pull first, then push again.

Switch or create a branch

To work on another branch, choose it in Branch. CAT Studio switches and reloads the project from that branch. If the project file is not on the branch you chose, CAT Studio asks first: switching closes the project, because there is nothing to open.

New branch makes a branch from the one you are on and switches to it; your changes that are not committed come along. The new branch reaches the server with your next Commit & Push.

With several servers (remotes), a Remote list appears beside the branch: it says where Pull takes from and Commit & Push sends to.

While something else runs

While tests run, or CAT Pilot is writing an answer, Pull, Commit & Push, New branch and the Branch and Remote lists wait: either could change the project. The other way round, while a pull, a push or a switch runs, the rest of CAT Studio waits for it: the left menu, the project buttons and CAT Pilot are greyed, and the keyboard shortcuts do nothing.

When a pull stops

When a pull finds that you and somebody else changed the same lines, Git stops it. The page names the files and shows what Git said, with a button to copy it. Solving that is outside CAT Studio: ask IT, or choose Give the pull up, which takes your files back to how they were before the pull.