git_status
Get git status for the current project. Returns current branch, staged files, unstaged changes, and untracked files.Parameters
Project ID (auto-detected from working directory if omitted)
Returns
Returns a JSON object with git status information.Current branch name
Array of staged files with status and path
Array of unstaged changes with status and path
Array of untracked files with status and path
Number of staged files
Number of unstaged changes
Number of untracked files
True if working directory is clean
Example
git_diff
Get git diff output. Shows unstaged changes by default, or staged changes withstaged=true.
Parameters
Project ID (auto-detected from working directory if omitted)
Specific file to diff (relative to project root)
Show staged changes instead of unstaged (default: false)
Returns
Returns the git diff output as text, or a message if no changes are found.Example
git_log
Get recent git commit history. Returns commit hash, message, author, and relative date.Parameters
Project ID (auto-detected from working directory if omitted)
Number of commits to show (default: 15, max: 50)
Show only commits affecting this file
Returns
Returns a JSON object with an array of commits.Number of commits returned
Example
git_stage
Stage files for commit. Stage a specific file or all changes.Parameters
Project ID (auto-detected from working directory if omitted)
File to stage (relative to project root). Omit to stage all changes.
Returns
Confirmation message indicating what was staged.Example
git_unstage
Unstage files from the staging area. Unstage a specific file or all staged changes.Parameters
Project ID (auto-detected from working directory if omitted)
File to unstage (relative to project root). Omit to unstage all.
Returns
Confirmation message indicating what was unstaged.Example
git_commit
Create a git commit with the currently staged changes.Parameters
Commit message
Project ID (auto-detected from working directory if omitted)
Returns
Git commit output or confirmation message.Example
Notes
- All git operations run directly against the project’s git repository
- The
project_idparameter is auto-detected from the working directory for most commands - Git must be installed and the project must be a git repository
- Git operations do not require CodeFire GUI to be running
