Git
The Git tab in the left sidebar shows the state of the repositories in the open workspace and performs the everyday operations on them. It drives a real git binary -- it is a front end, not a reimplementation.
Before it works
Git needs an executable, and most Amiga systems do not have one. The tab says so on first use and offers two ways forward:
- Set git path... -- point it at a git you already have
(a bare
gitis looked up on PATH, or give an absolute path). - Install the am-git extension from Extensions -> Manage extensions... It ships a git built for the platform and points the setting at it for you.
Either way the choice is stored in Settings -> Git and survives restarts.
Repositories
The studio registers every folder under the workspace that has its
own .git, down to the depth set in Settings -> Git (default 3
levels). A workspace with several checkouts under it therefore
shows all of them, and the header names the repository the panel
is currently looking at. The registry is remembered per workspace
in .studio/repos.json.
The status list
Changes are grouped into three sections:
- Staged -- ready for the next commit.
- Unstaged -- tracked files changed since the last commit.
- Untracked -- files git has never seen.
Each row carries a one-letter badge: M modified, A added, D deleted, R renamed, U untracked. Clicking a tracked row opens its diff in the editor area. Clicking an untracked row opens the file itself, in the plain editor.
Row actions
- + -- stage the file. Shown on unstaged and untracked rows. On a folder row it stages the whole directory.
- - -- discard the file's changes and restore it to its last committed state. On staged rows this is the primary action. It asks first, and it cannot be undone.
- I -- add the file (or the whole folder) to
.gitignore. Untracked rows only.
Committing
Type a message in the Commit message field under the list and press Commit. Only staged changes go in, as usual.
Pull, Push and More
A row of buttons sits under the header:
- Pull and Push run against the repository's configured remote and refresh the list when they finish.
- More opens a small menu:
- Switch branch... -- pick a branch from those in the repo.
- Log -- runs
git login the shared git terminal panel at the bottom of the window, where you can scroll it.
Operations run off the UI thread, so the studio stays responsive while git works -- which matters on a 68k, where a status call on a large repository takes seconds.
The folder tree
Folders that are repositories are coloured in the file tree, and
that colouring uses the .git directory on disk regardless of
whether Settings -> File tree hides it from view.