git-flutter CLI
The Git Flutter CLI is a comamnd line tool to save you time when using standard source setups.
$ git flutter
Work with Flutter-Global from the command line.
Usage:
git flutter [command]
Available Commands:
feature Create a feature branch for your work.
help Help about any command
hotfix Create a hotfix branch for your work.
push Push the current branch to remote origin.
release Start or cancel a release
status Displays the status of the current repo
sync Merges any outstanding changes into the current branch.
tag Tag the current branch with a semantic version.
Flags:
-h, --help help for git flutter
--no-network do not perform network operations
-v, --verbose verbose log output
--version version for git flutter
Use "git flutter [command] --help" for more information about a command.
MacOS or Linux
To install on macOS or Linux:
- Run the installation script:
curl -o- https://innersource.flutter.com/git-flutter/install.sh | bash
- Close and reopen your terminal to start using
git flutter
or run the following command to use it immediately:
[ -d "$HOME/.git-flutter/bin" ] && PATH="$HOME/.git-flutter/bin:$PATH"
- Verify the extension installation via
git
:
git flutter --version
Windows
To install on a Windows machine:
- Download the latest release v2.2.0.
Or if you have curl
installed, use this command:
curl https://innersource.flutter.com/git-flutter/git-flutter_2.2.0_Windows_x86_64.zip
- (Optional) Validate the binary by comparing the provided checksum with that of the download which you can calculate at the command prompt:
CertUtil -hashfile git-flutter_2.2.0_Windows_x86_64.zip SHA256
-
Extract the
git-flutter_2.2.0_Windows_x86_64.zip
file and copy thegit-flutter.exe
intoC:\Program Files\Git\usr\bin
. -
Verify the extension installation via
git
:
git flutter --version
Getting Started
Your usage of this tool depends on your choice of branching strategy – but it’s particularly recommended to reduce mistakes in complex branching models like multiple teams source. Read the CLI getting started guide for multiple team source here.
Configuration
You can configure the CLI using git config
locally for a specific checkout, or globally for all checkouts.
Fetch Frequency
The CLI model never goes to the actual origin but uses the view of the origin the local checkout has. This needs updating regularly from the remote origin by git fetch
, but this is slow (~1-2s).
There are 3 behaviours supported, configured via git config key flutter.fetch
:
never
: never fetch from remote originalways
: always fetch from remote originauto
: (default) periodically fetch from remote origin
To setup the fetch behaviour, run the following command:
git config --global flutter.fetch <never|always|auto>
Telemetry
We use OpenTelemetry to collect usage data and send it to our telemetry server. This helps us understand how you use the CLI so we can improve it for you.
We collect the following data:
- the command you ran
- the version of the CLI
- operating system & system architecture of your machine
- command run times
- any errors thar occur
We don’t collect any personal data.
You can configure this via git config key flutter.analytics
:
never
: never report analytics or update latest versionalways
: always report analytics or update latest version
The default behaviour uses a timestamp in this config key to ensure the remote config is only fetched every 24hrs. You can also run git flutter analytics
to update the timestamp value for the current day and force an update verification.
<timestamp>
: periodically report analytics or update latest version, with this Unix timestamp being the last fetch time of the remote config.
git config --global flutter.analytics <never|always|timestamp>
Support
The Inner Source Team support this CLI. Direct contributions are welcome via the fsc-git-flutter repository.