Skip to content

Git

Fleet provides Git and GitHub workflow management for registered apps. All GitHub operations use the gh CLI over HTTPS.


fleet git status

Show the git state for one or all apps.

Usage

Terminal window
fleet git status [app] [--json]

Arguments

ArgumentRequiredDescription
appNoApp name. Omit for all apps.

Examples

Terminal window
$ fleet git status
Git Status (3 apps)
APP BRANCH STATE ONBOARDED
myapp main clean yes
api develop dirty yes
worker - no git no
Terminal window
$ fleet git status myapp
Git: myapp
root: /srv/myapp
initialised: true
branch: main | branches: main, develop
remote: https://github.com/org/myapp.git
clean: true
onboarded: 2025-01-15T10:00:00.000Z
  • MCP tool: fleet_git_status

fleet git onboard

Create a GitHub repository for an app, push the code, and configure branch protection rules.

Usage

Terminal window
fleet git onboard <app> [--dry-run] [-y]

Arguments

ArgumentRequiredDescription
appYesApp name

Flags

FlagDescription
--dry-runShow the onboarding plan without making changes
-y, --yesSkip confirmation prompt

Examples

Terminal window
$ fleet git onboard myapp --dry-run
Onboard plan: myapp (fresh-repo)
root: /srv/myapp
1. git init
2. Create .gitignore
3. gh repo create org/myapp --private
4. Push main branch
5. Create and push develop branch
6. Enable branch protection on main and develop
dry run - no changes made
Terminal window
$ fleet git onboard myapp -y
Onboarded: myapp
Initialised git repo
Created GitHub repo
Pushed main and develop
Branch protection enabled
repo: https://github.com/org/myapp
  • MCP tool: fleet_git_onboard

fleet git onboard-all

Onboard all apps that have not yet been onboarded to GitHub.

Usage

Terminal window
fleet git onboard-all [--dry-run] [-y]

fleet git branch

Create a feature branch from a base branch and push it to origin.

Usage

Terminal window
fleet git branch <app> <name> [--from <branch>]

Arguments

ArgumentRequiredDescription
appYesApp name
nameYesNew branch name

Flags

FlagDescription
--from <branch>Base branch to create from (default: develop)

Examples

Terminal window
$ fleet git branch myapp feat/new-feature
created and pushed branch feat/new-feature from develop
Terminal window
$ fleet git branch myapp fix/bug --from main
created and pushed branch fix/bug from main
  • MCP tool: fleet_git_branch

fleet git commit

Stage all tracked changes and commit.

Usage

Terminal window
fleet git commit <app> -m "message" [--dry-run]

Arguments

ArgumentRequiredDescription
appYesApp name

Flags

FlagDescription
-m "message"Commit message (required)
--dry-runShow what would be committed without writing

Examples

Terminal window
$ fleet git commit myapp -m "feat: add new endpoint"
committed: feat: add new endpoint
  • MCP tool: fleet_git_commit

fleet git push

Push the current branch to origin.

Usage

Terminal window
fleet git push <app> [--dry-run]

Arguments

ArgumentRequiredDescription
appYesApp name

Examples

Terminal window
$ fleet git push myapp
pushed feat/new-feature
  • MCP tool: fleet_git_push

fleet git pr create

Create a pull request on GitHub from the current branch.

Usage

Terminal window
fleet git pr create <app> --title "..." [--base <branch>] [--dry-run]

Arguments

ArgumentRequiredDescription
appYesApp name

Flags

FlagDescription
--title "..."PR title (required)
--base <branch>Target branch (default: develop)
--dry-runShow what would be created

Examples

Terminal window
$ fleet git pr create myapp --title "feat: add new endpoint"
created PR #42: https://github.com/org/myapp/pull/42
  • MCP tool: fleet_git_pr_create

fleet git pr list

List open pull requests for an app.

Usage

Terminal window
fleet git pr list <app> [--json]

Arguments

ArgumentRequiredDescription
appYesApp name

Examples

Terminal window
$ fleet git pr list myapp
Pull Requests: myapp (2 open)
PR TITLE BRANCHES URL
#42 feat: new endpoint feat/new-endpoint -> dev https://...
#40 fix: bug fix fix/bug -> develop https://...
  • MCP tool: fleet_git_pr_list

fleet git release

Create a pull request from develop to main (release PR).

Usage

Terminal window
fleet git release <app> [--title "..."] [--dry-run]

Arguments

ArgumentRequiredDescription
appYesApp name

Flags

FlagDescription
--title "..."PR title (default: Release: <app>)
--dry-runShow what would be created

Examples

Terminal window
$ fleet git release myapp
created release PR #50: https://github.com/org/myapp/pull/50
Terminal window
$ fleet git release myapp --title "Release v1.2.0"
created release PR #50: https://github.com/org/myapp/pull/50
  • MCP tool: fleet_git_release