Git Integration

Complete Git workflow within TeamIDE - clone, stage, commit, push, history, diffs, and more

Overview

TeamIDE provides integrated Git support for managing your repositories without leaving the app. The Code module includes:

  • Visual file status indicators
  • Staging and committing changes
  • Commit history with expandable details
  • Side-by-side diff viewing
  • Inline comments on code changes
  • Submodule management with tabbed changes workflow

For advanced Git operations (merge, rebase, stash), use the integrated Terminal module.


Getting Started

Opening a Repository

  1. Use the Owner selector in the top bar to choose an account
  2. Select a repository from the Repository selector
  3. The Code module loads the repository’s file tree

For local repositories not on GitHub: 1. Select Local from the Owner selector 2. Choose from your local repositories

Cloning a Repository

To clone a new repository from GitHub:

  1. Click the Import button in the top bar
  2. Enter the repository URL or search by name
  3. Select the destination folder
  4. Click Clone

The repository is cloned and opened automatically.


File Status Indicators

Modified files show status badges in the file tree:

Badge Color Meaning
M Orange Modified - file has changes
A Green Added - new file (staged)
U Grey Untracked - new file (not staged)
D Red Deleted - file removed
R Blue Renamed - file moved or renamed

Folders containing modified files show a dot indicator.


Changes Tab

Access the Changes tab from the left panel in the Code module. It shows all modified, staged, and untracked files.

Viewing Changes

The Changes tab has two sections:

  1. Staged Changes - Files ready to commit (green checkmark)
  2. Unstaged Changes - Modified files not yet staged

Click any file to view its diff in the main panel.

Staging Files

Stage individual files: - Click the checkbox next to a file to stage it - Click again to unstage

Stage all files: - Click Stage All to stage all unstaged changes

Unstage all files: - Click Unstage All to move all files back to unstaged

Filtering Changes

Use the search box at the top of the Changes tab to filter files by name. This helps when you have many changed files.


Committing Changes

Creating a Commit

  1. Stage the files you want to commit
  2. Enter a Summary (required) - the first line of your commit message
  3. Optionally add a Description for more detail
  4. Click Commit to [branch-name]

The commit button shows which branch you’re committing to and is disabled until you have staged files and a summary.

After Committing

  • The form clears automatically
  • The Changes tab refreshes to show remaining changes
  • The History tab updates with your new commit

History Tab

Access the History tab from the left panel to view commit history.

Viewing Commits

The commit list shows: - Commit hash (short form) - Author name - Date and time - Commit message (first line) - Comment badge if the commit has comments

Expanding Commits

Click any commit to expand it and see: - Full commit message (including description) - List of files changed - Status of each file (added, modified, deleted)

Click a file in the expanded commit to view its diff.

Refreshing History

Click the Refresh button to reload the commit history. This is useful after pulling changes or when collaborating.


Diff Viewer

The diff viewer shows line-by-line changes with color coding:

Color Meaning
Green background Line added
Red background Line removed
White/grey background Unchanged context line

Opening Diffs

From Changes tab: - Click any modified file to see uncommitted changes

From History tab: - Expand a commit and click a file to see changes from that commit

Diff Features

  • Line numbers for both old and new versions
  • Hunk headers showing line ranges
  • Scrollable view for large diffs
  • Opens in a new tab (orange icon indicates diff)

Inline Comments

Add comments directly on diff lines for code review and discussion.

Adding a Comment

  1. Open a diff (from Changes or History)
  2. Hover over a line - a comment icon appears
  3. Click the icon to open the comment input
  4. Type your comment and submit

Comment Features

  • Threaded replies - Reply to existing comments for discussions
  • Edit comments - Modify your own comments
  • Delete comments - Remove comments you created
  • Context preservation - Comments store surrounding lines for reference

Comment Types

Type Description
Line comments Attached to specific diff lines
Commit comments General comments on entire commits

Comments are stored with your repository and persist across sessions.


Branch Management

Viewing Current Branch

The current branch is shown in: - The top bar Branch selector - The commit button (“Commit to main”)

Switching Branches

  1. Click the Branch selector in the top bar
  2. Select a branch from the dropdown
  3. The file tree and status update to reflect the new branch

Creating and Deleting Branches

For branch creation, deletion, and merging, use the Terminal module:

# Create a new branch
git checkout -b feature/my-feature

# Delete a branch
git branch -d old-branch

# Merge a branch
git merge feature/my-feature

Push, Pull, and Fetch

Pushing Changes

After committing, push your changes to the remote:

  1. Open the Terminal module
  2. Run git push

Or push with upstream tracking:

git push -u origin feature/my-branch

Pulling Changes

To get the latest changes from the remote:

  1. Open the Terminal module
  2. Run git pull

Fetching Without Merging

To fetch remote changes without merging:

git fetch origin

Submodules

TeamIDE supports Git submodules with visual status indicators and quick actions.

Submodule Status Badges

Submodule folders show colored status badges:

Color Status Meaning
Green Clean Up to date, no changes
Orange Dirty Has uncommitted changes
Blue Ahead Has commits not pushed
Purple Behind Remote has newer commits
Red Diverged Both ahead and behind
Grey Uninitialized Submodule not yet cloned

Hover over a submodule badge to see details: name, branch, status, and commits ahead/behind.

Submodule Operations

Right-click a submodule folder for actions:

Action Description
Fetch Fetch remote changes for the submodule
Pull Pull and merge remote changes
Push Push submodule commits to remote

Initializing Submodules

If submodules show as uninitialized (grey badge):

  1. Open the Terminal module
  2. Run git submodule update --init --recursive

The submodule status updates automatically after initialization.

Managing Submodule Changes

When submodules have uncommitted changes, they appear as tabs in the Changes tab.

Submodule Tabs

The Changes tab shows tabs for each repository with changes:

  • Parent tab - Changes in the main repository
  • Submodule tabs - One tab per submodule with uncommitted changes

Tabs only appear when that repository has changes, keeping the interface clean. Each tab shows a badge with the number of changed files.

Staging and Committing in Submodules

The workflow is identical to the parent repository:

  1. Click a submodule tab to switch context
  2. Stage files using checkboxes
  3. Enter a commit message
  4. Click Commit to [submodule-name]

The commit button shows which repository you’re committing to.

Auto-Sync with Parent

After committing to a submodule:

  1. The submodule’s changes clear (commit completed)
  2. The Parent tab shows the submodule as modified (updated reference)
  3. Stage and commit the parent to update the submodule reference

This ensures your parent repository always references the correct submodule commits, keeping your repository in a consistent state.


Git Gutter (Editor)

When editing files, the editor can show Git changes in the gutter (left margin):

  • Green bar - New lines added
  • Red bar - Lines deleted
  • Blue bar - Lines modified

Enabling Git Gutter

  1. Go to Settings > Features > Code
  2. Enable Git Gutter

Settings

Auto-Save

Configure auto-save behavior in Settings > Code:

Mode Description
Off Manual save only (Cmd/Ctrl+S)
After Delay Saves after you stop typing (configurable delay)
On Focus Change Saves when you click away from the editor
On Window Change Saves when switching applications

Auto-save delay is configurable from 0.1 to 10 seconds (default: 1 second).

Hidden Files

Toggle visibility of hidden files (like .git, .env) in Settings > Code: - Enable Show Hidden Files to see all files - Disable to hide files starting with .


Keyboard Shortcuts

Shortcut Action
Cmd/Ctrl+S Save current file
Cmd/Ctrl+Shift+S Save all open files

Tips

Efficient Staging

  • Use Stage All for quick commits of all changes
  • Use individual checkboxes when you want to commit only specific files
  • Filter by filename when working with many changes

Reviewing Before Commit

  1. Click each staged file to review its diff
  2. Check the changes are what you expect
  3. Then commit

Using Comments for Code Review

  • Add comments on specific lines to discuss changes with collaborators
  • Use threaded replies to keep discussions organized
  • Comments persist with the repository

Terminal for Advanced Git

For operations not in the UI, the Terminal is always available:

# Stash changes
git stash
git stash pop

# Interactive rebase
git rebase -i HEAD~3

# Cherry-pick
git cherry-pick abc1234

# Reset
git reset --soft HEAD~1

Changelog

Date Change
2026-02-04 Added submodule changes management with tabbed workflow
2026-02-02 Initial documentation