Add specific file to staging area
File path to add (relative to repository root or absolute)
Add multiple files to staging area
Array of file paths to add (relative to repository root or absolute)
Safely checkout to the specified branch with the following steps:
The name of the branch to checkout
True if checkout was successful, false otherwise
Commit staged changes
Commit message
Create branch, commit and push (legacy method)
Branch name
Commit message
Create a new branch
Branch name to create
Extract base URL from Git remote URL with protocol detection
OptionalremoteUrl: stringGit remote URL (optional, will get current remote if not provided)
Base URL (e.g., "https://github.com", "https://gitlab.example.com")
Extract hostname from Git remote URL
OptionalremoteUrl: stringGit remote URL (optional, will get current remote if not provided)
Hostname (e.g., 'github.com', 'gitlab.example.com')
Force re-detection of protocol for hostname (asynchronous)
The hostname to re-detect
Promise
Get the most likely parent branch of the current branch Tries multiple strategies to find the base branch:
Base branch name or null if not found or in detached HEAD
Get simplified branch graph visualization (similar to GitLens)
Maximum number of commits to show (default: 20)
String representation of branch graph
Optionallimit: numberGet list of changed files between two branches
Base branch name
Target branch name
Array of changed file paths
Get current branch name
Get current commit hash
Get detected protocol for hostname (synchronous, may return cached result)
The hostname to check
Base URL with detected protocol
Get git diff of staged changes
Diff options
Git diff output
Get diff between two branches
Base branch name
Target branch name
Diff options
Git diff output between branches
Get git diff of specific files (unstaged changes)
Array of file paths to check diff for
Diff options
Git diff output
Get merge-base commit hash between current branch and target branch
Target branch name
Merge-base commit hash or null if not found
Get all remote branches from the remote repository
OptionalremoteName: stringRemote name (optional, uses default remote if not provided)
Array of remote branch names (without remote prefix)
Gets the default remote name for the current repository. Tries to detect the most appropriate remote in the following order:
The default remote name or 'origin' as fallback
Get remote URL for specified remote
OptionalremoteName: stringGet git repository root directory Result is cached after first call for performance
Get short commit hash
Get target branch for merge request (default branch or fallback)
Target branch name
Get git user email (cached after first call)
Get git user name (cached after first call)
Check if a remote branch exists
Branch name to check (without remote prefix, e.g., 'main')
OptionalremoteName: stringRemote name (optional, uses default remote if not provided)
True if branch exists, false otherwise
Check if repository has staged changes
Check if repository has uncommitted changes
Parse project path from Git remote URL
OptionalremoteUrl: stringGit remote URL (optional, will get current remote if not provided)
Project path (e.g., "user/repo")
Push current branch to remote
Branch name to push
Display comprehensive Git repository information
Get git repository status for all files
Array of GitFileStatus objects representing file changes
StaticclearClear protocol cache for a specific hostname or all hostnames
Optionalhostname: stringOptional hostname to clear, if not provided clears all cache
StaticgetGet current protocol cache (for debugging)
Copy of current cache entries
Staticinstance
Git operations service