cortex git

Full git porcelain interface executed through the Cortex agent workspace. Ten subcommands provide complete git version control with agent-powered commit messages and branch management.

Usage

cortex git <subcommand> [options]

Subcommands

SubcommandDescription
statusShow working tree status
logShow commit history
diffShow changes between commits or working tree
addStage files for commit
commitCreate a new commit
pushPush commits to remote
pullPull changes from remote
cloneClone a repository
branchList or manage branches
remoteManage remote repositories

Subcommand Details

cortex git status

cortex git status                     # Show working tree status

cortex git log

cortex git log                        # Show commit history
cortex git log --limit 20             # Limit to 20 entries

cortex git diff

cortex git diff                       # Show unstaged changes
cortex git diff --stat                # Show diff statistics
cortex git diff --file path/to/file   # Diff a specific file

cortex git add

cortex git add path/to/file           # Stage a specific file
cortex git add --all                  # Stage all changes

cortex git commit

cortex git commit <message>            # Create commit with message
cortex git commit --all                # Stage all and commit

cortex git push

cortex git push                       # Push to default remote
cortex git push --remote origin       # Specify remote
cortex git push --branch main         # Specify branch

cortex git pull

cortex git pull                       # Pull from default remote
cortex git pull --remote origin       # Specify remote
cortex git pull --branch main         # Specify branch

cortex git clone

cortex git clone <url>                # Clone a repository
cortex git clone <url> --branch main  # Clone a specific branch

cortex git branch

cortex git branch                     # List all branches
cortex git branch --create feature-x  # Create a new branch
cortex git branch --checkout main     # Checkout a branch

cortex git remote

cortex git remote                     # List remotes
cortex git remote --add origin <url>  # Add a remote
cortex git remote --url               # Show remote URLs

Examples

# Commit with a message
cortex git commit "fix: resolve type error in auth module"

# Clone and set up a project
cortex git clone https://github.com/user/repo.git

# Create a feature branch
cortex git branch --create feature/new-dashboard

# Push to a specific remote branch
cortex git push --remote origin --branch feature/new-dashboard