File changes
Stage, commit, push, and pull for a worktree, straight from the sidebar.
The file changes sidebar is the right-hand panel where you review a worktree's changes and move them through git: stage, commit, push, and pull without leaving Tegment or dropping to the terminal. It always reflects the worktree you have selected.
Toggle it with the File Changes button in the tab bar or with Ctrl+Shift+F. The panel stacks Staged Changes (when you have any), Changes, and Branch Commits, with a commit box pinned at the bottom.
Staging#
Hover a file to stage it with + or unstage it with −, or use Stage all and Unstage all in the section headers. The same actions live in a file's right-click menu. Staging is per file; Tegment stages whole files, not individual lines.
Committing#
Type a message in the box at the bottom and choose Commit. If nothing is staged, the button reads Commit all and commits every change; if you've staged files, it commits just those and shows the count. Submit from the keyboard with Ctrl+Enter.
You can start committing in a brand-new repository too: the first commit works straight from the sidebar.
Pushing and pulling#
The Branch Commits header carries an up arrow to push and a down arrow to pull, each with a badge for how many commits are outgoing or incoming.
- Push sends your branch's commits to the remote. The first push on a new branch sets its upstream for you.
- Pull brings in commits from the remote. Commit your changes first: pulling is blocked while the worktree has uncommitted changes.
The refresh button next to them fetches and refreshes, so the incoming count stays honest. To keep that count current on its own, turn on background fetch (see Settings below).
Viewing diffs and commits#
Click a file to open its diff, or a commit in Branch Commits to see that commit's changes in the diff viewer. Branch Commits lists the commits unique to this branch, with a hollow marker on any that aren't pushed yet.
A file's right-click menu also offers Copy path, Open in editor (the in-app editor), Open in your IDE, Add to .gitignore, and Discard changes.
Settings#
Under Settings → Refresh Intervals:
- File Changes Refresh Interval sets how often the sidebar re-checks for changes on disk (a file watcher catches most updates; this is the backstop).
- Background Fetch periodically fetches the active repository so incoming commit counts stay current without a manual refresh, with a configurable interval.