Git patterns
https://seesparkbox.com/foundry/semantic_commit_messages
Introduction
Branches and Environment Setup
We currently have two backend environments running in parallel on GCP, and two corresponding frontend flows connected through Flavor.
Backend environments
Production / Alpha
Backend branch:
alpha
GCP URL:
https://colibri-api-643619291153.me-west1.run.app
Frontend flavor:
Flavor.production
App name:
colibri
Alpha Lite
Backend branch:
alpha-lite
GCP URL:
https://colibri-api-alpha-lite-643619291153.me-west1.run.app
Frontend flavor:
Flavor.alphaLite
App name:
colibri alpha-lite
The frontend selects the correct backend through FlavorConfig:
static void configure(Flavor flavor) {
switch (flavor) {
case Flavor.production:
instance \= const FlavorConfig.\_(
flavor: Flavor.production,
baseUrl: 'https://colibri-api-643619291153.me-west1.run.app',
appName: 'colibri',
);
case Flavor.alphaLite:
instance \= const FlavorConfig.\_(
flavor: Flavor.alphaLite,
baseUrl: 'https://colibri-api-alpha-lite-643619291153.me-west1.run.app',
appName: 'colibri alpha-lite',
);
}
}
bool get isProduction => flavor == Flavor.production;
bool get isAlphaLite => flavor == Flavor.alphaLite;
How to work with branches
We have two separate main development branches:
alpha
alpha-lite
For the regular version, create your personal/task branch from alpha:
git checkout alpha
git pull origin alpha
git checkout \-b your-name/task-name
When the task is finished, open a pull request back into:
alpha
For the Lite version, create your personal/task branch only from alpha-lite:
git checkout alpha-lite
git pull origin alpha-lite
git checkout -b your-name/task-name-lite
When the Lite task is finished, open a pull request back into:
alpha-lite
Important rule
Branches created from alpha should be merged into alpha.
Branches created from alpha-lite should be merged into alpha-lite.
The two versions are deployed separately and work in parallel, so we should not accidentally merge Lite changes into the regular Alpha branch or regular Alpha changes into the Lite branch unless we intentionally decide to sync specific changes.